more reliable focus management based on https://supernapie.com/blog/keyboard-focus-in-an-iframe/
This commit is contained in:
parent
9e3f937404
commit
844cbc22a0
4 changed files with 10 additions and 24 deletions
|
|
@ -152,7 +152,7 @@
|
|||
js2o: js2o,
|
||||
ajax: ajax,
|
||||
clone: clone,
|
||||
focus: setFocus,
|
||||
focus: () => {},
|
||||
stats: STATS,
|
||||
catalog: CATALOG,
|
||||
conf: {
|
||||
|
|
@ -1889,17 +1889,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
function setFocus(el) {
|
||||
el = [ el || UI.focuser, UI.load, UI.sizeX, DOC.body ];
|
||||
for (let es, i=0; i<el.length; i++) {
|
||||
es = el[i];
|
||||
es.focus();
|
||||
if (DOC.activeElement === es) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setViewMode(mode) {
|
||||
let oldMode = viewMode;
|
||||
viewMode = mode;
|
||||
|
|
|
|||
Loading…
Reference in a new issue