mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 11:19:32 -06:00
gfse: fix an issue with Webkit browers
For lin and lincats with empty RHSs, there was nothing to point to to make the edit button (the "%" button) appear in browsers based on Webkit (Safari, Chrome).
This commit is contained in:
@@ -635,7 +635,7 @@ function draw_lincats(g,i) {
|
|||||||
}
|
}
|
||||||
function del(c) { return function() { delete_lincat(g,i,c); } }
|
function del(c) { return function() { delete_lincat(g,i,c); } }
|
||||||
function dlc(c,cls) {
|
function dlc(c,cls) {
|
||||||
var t=editable("span",text(c.type),g,edit(c),"Edit lincat for "+c.cat);
|
var t=editable("span",text_ne(c.type),g,edit(c),"Edit lincat for "+c.cat);
|
||||||
return node("span",{"class":cls},
|
return node("span",{"class":cls},
|
||||||
[ident(c.cat),sep(" = "),t]);
|
[ident(c.cat),sep(" = "),t]);
|
||||||
}
|
}
|
||||||
@@ -797,7 +797,7 @@ function draw_lins(g,i) {
|
|||||||
l.push(ident(f.args[i]));
|
l.push(ident(f.args[i]));
|
||||||
}
|
}
|
||||||
l.push(sep(" = "));
|
l.push(sep(" = "));
|
||||||
var t=editable("span",text(f.lin),g,edit(f),"Edit lin for "+f.fun);
|
var t=editable("span",text_ne(f.lin),g,edit(f),"Edit lin for "+f.fun);
|
||||||
l.push(t);
|
l.push(t);
|
||||||
return node("span",{"class":cls},l);
|
return node("span",{"class":cls},l);
|
||||||
}
|
}
|
||||||
@@ -991,6 +991,10 @@ function more(g,action,hint) {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function text_ne(s) { // like text(s), but force it to be non-empty
|
||||||
|
return text(s ? s : "\xa0\xa0\xa0")
|
||||||
|
}
|
||||||
|
|
||||||
function editable(tag,cs,g,f,hint) {
|
function editable(tag,cs,g,f,hint) {
|
||||||
var b=edit_button(function(){f(g,e)},hint);
|
var b=edit_button(function(){f(g,e)},hint);
|
||||||
var e=node(tag,{"class":"editable"},[cs,b]);
|
var e=node(tag,{"class":"editable"},[cs,b]);
|
||||||
|
|||||||
Reference in New Issue
Block a user