fixed for firefox
This commit is contained in:
parent
a6f4ee3b3f
commit
6d40421992
4 changed files with 26 additions and 6 deletions
|
|
@ -183,7 +183,6 @@ var gs_moto_ui = exports;
|
|||
|
||||
pop.setAttribute("class", "poptext flow-col");
|
||||
box.setAttribute("style", "position: relative");
|
||||
btn.appendChild(box);
|
||||
box.appendChild(pop);
|
||||
pop.appendChild(lbl);
|
||||
pop.appendChild(txt);
|
||||
|
|
@ -195,6 +194,19 @@ var gs_moto_ui = exports;
|
|||
|
||||
btn.appendChild(DOC.createTextNode("edit"));
|
||||
btn.onclick = function(ev) {
|
||||
btn.parentNode.appendChild(box);
|
||||
btn.parentNode.onclick = function(ev) {
|
||||
ev.stopPropagation();
|
||||
if (ev.target === txt) return;
|
||||
var showing = pop === lastPop;
|
||||
hidePop();
|
||||
if (!showing) {
|
||||
pop.style.display = "flex";
|
||||
lastPop = pop;
|
||||
txt.focus();
|
||||
}
|
||||
};
|
||||
|
||||
ev.stopPropagation();
|
||||
if (ev.target === txt) return;
|
||||
var showing = pop === lastPop;
|
||||
|
|
@ -202,6 +214,7 @@ var gs_moto_ui = exports;
|
|||
if (!showing) {
|
||||
pop.style.display = "flex";
|
||||
lastPop = pop;
|
||||
txt.focus();
|
||||
}
|
||||
};
|
||||
addModeControls(btn, opt);
|
||||
|
|
|
|||
Loading…
Reference in a new issue