Makes Attributes interface uniform.
This commit is contained in:
parent
64e8419ff1
commit
2f83433422
|
@ -423,7 +423,6 @@
|
||||||
return MENU.Event(event,this.menu||this.parentNode,(this.menu?"Touchend":"Remove"));
|
return MENU.Event(event,this.menu||this.parentNode,(this.menu?"Touchend":"Remove"));
|
||||||
},
|
},
|
||||||
Event: function (event,menu,type,force) {
|
Event: function (event,menu,type,force) {
|
||||||
console.log(type);
|
|
||||||
if (MENU.skipMouseover && type === "Mouseover" && !force) {return FALSE(event)}
|
if (MENU.skipMouseover && type === "Mouseover" && !force) {return FALSE(event)}
|
||||||
if (MENU.skipUp) {
|
if (MENU.skipUp) {
|
||||||
if (type.match(/Mouseup|Touchend/)) {delete MENU.skipUp; return FALSE(event)}
|
if (type.match(/Mouseup|Touchend/)) {delete MENU.skipUp; return FALSE(event)}
|
||||||
|
@ -686,13 +685,14 @@
|
||||||
|
|
||||||
role: "menuitem", // Aria role.
|
role: "menuitem", // Aria role.
|
||||||
|
|
||||||
Attributes: function() {
|
Attributes: function(def) {
|
||||||
var def = this.SUPER(arguments).Attributes.call(
|
def = HUB.Insert(
|
||||||
this,
|
|
||||||
{onmouseover: MENU.Mouseover, onmouseout: MENU.Mouseout,
|
{onmouseover: MENU.Mouseover, onmouseout: MENU.Mouseout,
|
||||||
onmousedown: MENU.Mousedown, role: this.role,
|
onmousedown: MENU.Mousedown, role: this.role,
|
||||||
onkeydown: MENU.Keydown,
|
onkeydown: MENU.Keydown,
|
||||||
'aria-disabled': !!this.disabled});
|
'aria-disabled': !!this.disabled},
|
||||||
|
def);
|
||||||
|
def = this.SUPER(arguments).Attributes.call(this, def);
|
||||||
if (this.disabled) {
|
if (this.disabled) {
|
||||||
def.className += " MathJax_MenuDisabled";
|
def.className += " MathJax_MenuDisabled";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user