Merge branch 'abstract_menu_entry_class' into add_tabbing
Conflicts: unpacked/extensions/MathMenu.js
This commit is contained in:
commit
5e88e80975
|
@ -529,12 +529,16 @@
|
|||
SetNode: function(node) {
|
||||
this.node = node;
|
||||
},
|
||||
Attributes: function() {
|
||||
return {onmouseup: MENU.Mouseup,
|
||||
ondragstart: FALSE, onselectstart: FALSE, onselectend: FALSE,
|
||||
ontouchstart: MENU.Touchstart, ontouchend: MENU.Touchend,
|
||||
className: "MathJax_MenuItem", menuItem: this};
|
||||
},
|
||||
|
||||
Attributes: function(def) {
|
||||
return HUB.Insert(
|
||||
{onmouseup: MENU.Mouseup,
|
||||
ondragstart: FALSE, onselectstart: FALSE, onselectend: FALSE,
|
||||
ontouchstart: MENU.Touchstart, ontouchend: MENU.Touchend,
|
||||
className: "MathJax_MenuItem", menuItem: this},
|
||||
def);
|
||||
},
|
||||
|
||||
Create: function (menu) {
|
||||
if (!this.hidden) {
|
||||
var def = this.Attributes();
|
||||
|
@ -614,16 +618,16 @@
|
|||
role: "menuitem", // Aria role.
|
||||
|
||||
Attributes: function() {
|
||||
var def = this.SUPER(arguments).Attributes.apply(this,arguments);
|
||||
var def = this.SUPER(arguments).Attributes.call(
|
||||
this,
|
||||
{onmouseover: MENU.Mouseover, onmouseout: MENU.Mouseout,
|
||||
onmousedown: MENU.Mousedown, role: this.role,
|
||||
'aria-disabled': !!this.disabled});
|
||||
if (this.disabled) {
|
||||
def.className += " MathJax_MenuDisabled";
|
||||
}
|
||||
var augdef = {onmouseover: MENU.Mouseover, onmouseout: MENU.Mouseout,
|
||||
onmousedown: MENU.Mousedown, role: this.role,
|
||||
onkeydown: MENU.Keydown, tabIndex: -1,
|
||||
'aria-disabled': !!this.disabled};
|
||||
return MathJax.Hub.Insert(def, augdef);
|
||||
},
|
||||
return def;
|
||||
}
|
||||
Keydown: function(event, menu) {
|
||||
console.log('MENUEntry');
|
||||
switch (event.keyCode) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user