Focuses popup windows.
This commit is contained in:
parent
189d4a8a81
commit
986ee52e8a
|
@ -101,7 +101,7 @@
|
|||
HELP.Post = function () {
|
||||
this.div = MENU.Background(this);
|
||||
var help = HTML.addElement(this.div,"div",{
|
||||
id: "MathJax_Help"
|
||||
id: "MathJax_Help", tabIndex: "0"
|
||||
},LOCALE._("HelpDialog",[
|
||||
["b",{style:{fontSize:"120%"}},[["Help","MathJax Help"]]],
|
||||
["div",{id: "MathJax_HelpContent"},[
|
||||
|
@ -148,10 +148,13 @@
|
|||
]
|
||||
]],
|
||||
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
|
||||
["span",{id: "MathJax_HelpClose", onclick: HELP.Remove},
|
||||
["span",{id: "MathJax_HelpClose", onclick: HELP.Remove,
|
||||
onkeydown: HELP.Remove, tabIndex: '0',
|
||||
'aria-label': 'Close', 'aria-describedby': 'Close window'},
|
||||
[["span",{},["\u00D7"]]]
|
||||
]
|
||||
]));
|
||||
help.focus();
|
||||
LOCALE.setCSS(help);
|
||||
var doc = (document.documentElement||{});
|
||||
var H = window.innerHeight || doc.clientHeight || doc.scrollHeight || 0;
|
||||
|
|
|
@ -477,7 +477,6 @@
|
|||
/*
|
||||
* Keyboard navigation of menu.
|
||||
*/
|
||||
active: null, // The currently focused item. There can only be one! HTML!
|
||||
posted: false, // Is a menu open?
|
||||
|
||||
GetNode: function(jax) {
|
||||
|
@ -746,7 +745,6 @@
|
|||
},
|
||||
|
||||
Label: function (def,menu) {return [this.Name()]},
|
||||
//TODO: Focus the popup.
|
||||
Mouseup: function (event,menu) {
|
||||
if (!this.disabled) {
|
||||
this.Remove(event,menu);
|
||||
|
@ -973,7 +971,7 @@
|
|||
]]);
|
||||
MENU.About.div = MENU.Background(MENU.About);
|
||||
var about = HTML.addElement(MENU.About.div,"div",{
|
||||
id: "MathJax_About"
|
||||
id: "MathJax_About", tabIndex:0
|
||||
},[
|
||||
["b",{style:{fontSize:"120%"}},["MathJax"]]," v"+MathJax.version,["br"],
|
||||
_(font.replace(/ /g,""),"using "+font),["br"],["br"],
|
||||
|
@ -983,9 +981,13 @@
|
|||
"background-color":"#E4E4E4", padding:".4em .6em", border:"1px inset"
|
||||
}},jax],["br"],["br"],
|
||||
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
|
||||
["span",{className:"MathJax_MenuClose",id:"MathJax_AboutClose",onclick:MENU.About.Remove},
|
||||
["span",{className:"MathJax_MenuClose",id:"MathJax_AboutClose",
|
||||
onclick:MENU.About.Remove,
|
||||
onkeydown:MENU.About.Remove, tabIndex:0,
|
||||
'aria-label': "Close", 'aria-describedby': "Close window"},
|
||||
[["span",{},"\u00D7"]]]
|
||||
]);
|
||||
about.focus();
|
||||
MathJax.Localization.setCSS(about);
|
||||
var doc = (document.documentElement||{});
|
||||
var H = window.innerHeight || doc.clientHeight || doc.scrollHeight || 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user