Skip to content

Commit

Permalink
Add jax parameter to getTabOrder() so that, if overridden, you can id…
Browse files Browse the repository at this point in the history
…entify the jax (and it asociated script).
  • Loading branch information
dpvc committed Feb 6, 2016
1 parent a597f21 commit d1a569c
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions unpacked/MathJax.js
Original file line number Diff line number Diff line change
Expand Up @@ -2368,14 +2368,14 @@ MathJax.Hub = {
error.oncontextmenu = EVENT.Menu;
error.onmousedown = EVENT.Mousedown;
error.onkeydown = EVENT.Keydown;
error.tabIndex = this.getTabOrder();
error.tabIndex = this.getTabOrder(this.getJaxFor(script));
} else {
MathJax.Ajax.Require("[MathJax]/extensions/MathEvents.js",function () {
var EVENT = MathJax.Extension.MathEvents.Event;
error.oncontextmenu = EVENT.Menu;
error.onmousedown = EVENT.Mousedown;
error.keydown = EVENT.Keydown;
error.tabIndex = this.getTabOrder();
error.tabIndex = this.getTabOrder(this.getJaxFor(script));
});
}
//
Expand Down Expand Up @@ -2463,7 +2463,7 @@ MathJax.Hub = {
return dst;
},

getTabOrder: function() {
getTabOrder: function(script) {
return this.config.menuSettings.inTabOrder ? 0 : -1;
},

Expand Down
2 changes: 1 addition & 1 deletion unpacked/extensions/MathMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@
jax.tabIndex = jax.oldTabIndex
delete jax.oldTabIndex;
} else {
jax.tabIndex = HUB.getTabOrder();
jax.tabIndex = HUB.getTabOrder(jax);
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion unpacked/jax/output/CommonHTML/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
onclick:EVENT.Click, ondblclick:EVENT.DblClick,
// Added for keyboard accessible menu.
onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder()
onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder(jax)
});
if (jax.CHTML.display) {
//
Expand Down
2 changes: 1 addition & 1 deletion unpacked/jax/output/HTML-CSS/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@
onmousemove:EVENT.Mousemove, onclick:EVENT.Click,
ondblclick:EVENT.DblClick,
// Added for keyboard accessible menu.
onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder()
onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder(jax)
});
if (HUB.Browser.noContextMenu) {
span.ontouchstart = TOUCH.start;
Expand Down
2 changes: 1 addition & 1 deletion unpacked/jax/output/NativeMML/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
container.ondblclick = EVENT.DblClick;
// Added for keyboard accessible menu.
container.onkeydown = EVENT.Keydown;
container.tabIndex = HUB.getTabOrder();
container.tabIndex = HUB.getTabOrder(jax);
if (HUB.Browser.noContextMenu) {
container.ontouchstart = TOUCH.start;
container.ontouchend = TOUCH.end;
Expand Down
2 changes: 1 addition & 1 deletion unpacked/jax/output/PlainSource/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
ondblclick: EVENT.DblClick,
// Added for keyboard accessible menu.
onkeydown: EVENT.Keydown,
tabIndex: HUB.getTabOrder()
tabIndex: HUB.getTabOrder(jax)
},[["span"]]);
if (HUB.Browser.noContextMenu) {
span.ontouchstart = TOUCH.start;
Expand Down
2 changes: 1 addition & 1 deletion unpacked/jax/output/PreviewHTML/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
onclick:EVENT.Click, ondblclick:EVENT.DblClick,
// Added for keyboard accessible menu.
onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder()
onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder(jax)
});
if (HUB.Browser.noContextMenu) {
span.ontouchstart = TOUCH.start;
Expand Down
2 changes: 1 addition & 1 deletion unpacked/jax/output/SVG/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
onclick:EVENT.Click, ondblclick:EVENT.DblClick,
// Added for keyboard accessible menu.
onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder()
onkeydown: EVENT.Keydown, tabIndex: HUB.getTabOrder(jax)
});
if (HUB.Browser.noContextMenu) {
span.ontouchstart = TOUCH.start;
Expand Down

0 comments on commit d1a569c

Please sign in to comment.