Menu Focus and such.
This commit is contained in:
parent
9cfc3cad05
commit
b6dcaa7ac4
@ -1802,7 +1802,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
Menu.prototype.open = function(button, data) {
|
Menu.prototype.open = function(button, data) {
|
||||||
var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, prevEntry, right, style, top, _i, _len, _ref, _ref1, _ref2;
|
var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, right, style, top, _i, _len, _ref, _ref1, _ref2;
|
||||||
|
|
||||||
menu = this.makeMenu();
|
menu = this.makeMenu();
|
||||||
currentMenu = menu;
|
currentMenu = menu;
|
||||||
@ -1812,11 +1812,6 @@
|
|||||||
entry = _ref[_i];
|
entry = _ref[_i];
|
||||||
this.insertEntry(entry, menu, data);
|
this.insertEntry(entry, menu, data);
|
||||||
}
|
}
|
||||||
entry = $('.entry', menu);
|
|
||||||
while (prevEntry = this.findNextEntry(entry, -1)) {
|
|
||||||
entry = prevEntry;
|
|
||||||
}
|
|
||||||
this.focus(entry);
|
|
||||||
$.on(d, 'click', this.close);
|
$.on(d, 'click', this.close);
|
||||||
$.on(d, 'CloseMenu', this.close);
|
$.on(d, 'CloseMenu', this.close);
|
||||||
$.add(Header.hover, menu);
|
$.add(Header.hover, menu);
|
||||||
@ -1833,6 +1828,8 @@
|
|||||||
style.right = "" + right + "px";
|
style.right = "" + right + "px";
|
||||||
style.bottom = "" + bottom + "px";
|
style.bottom = "" + bottom + "px";
|
||||||
style.left = "" + left + "px";
|
style.left = "" + left + "px";
|
||||||
|
entry = $('.entry', menu);
|
||||||
|
this.focus(entry);
|
||||||
return menu.focus();
|
return menu.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1793,7 +1793,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
Menu.prototype.open = function(button, data) {
|
Menu.prototype.open = function(button, data) {
|
||||||
var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, prevEntry, right, style, top, _i, _len, _ref, _ref1, _ref2;
|
var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, right, style, top, _i, _len, _ref, _ref1, _ref2;
|
||||||
|
|
||||||
menu = this.makeMenu();
|
menu = this.makeMenu();
|
||||||
currentMenu = menu;
|
currentMenu = menu;
|
||||||
@ -1803,11 +1803,6 @@
|
|||||||
entry = _ref[_i];
|
entry = _ref[_i];
|
||||||
this.insertEntry(entry, menu, data);
|
this.insertEntry(entry, menu, data);
|
||||||
}
|
}
|
||||||
entry = $('.entry', menu);
|
|
||||||
while (prevEntry = this.findNextEntry(entry, -1)) {
|
|
||||||
entry = prevEntry;
|
|
||||||
}
|
|
||||||
this.focus(entry);
|
|
||||||
$.on(d, 'click', this.close);
|
$.on(d, 'click', this.close);
|
||||||
$.on(d, 'CloseMenu', this.close);
|
$.on(d, 'CloseMenu', this.close);
|
||||||
$.add(Header.hover, menu);
|
$.add(Header.hover, menu);
|
||||||
@ -1824,6 +1819,8 @@
|
|||||||
style.right = "" + right + "px";
|
style.right = "" + right + "px";
|
||||||
style.bottom = "" + bottom + "px";
|
style.bottom = "" + bottom + "px";
|
||||||
style.left = "" + left + "px";
|
style.left = "" + left + "px";
|
||||||
|
entry = $('.entry', menu);
|
||||||
|
this.focus(entry);
|
||||||
return menu.focus();
|
return menu.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
@ -1716,7 +1716,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
Menu.prototype.open = function(button, data) {
|
Menu.prototype.open = function(button, data) {
|
||||||
var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, prevEntry, right, style, top, _i, _len, _ref, _ref1, _ref2;
|
var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, right, style, top, _i, _len, _ref, _ref1, _ref2;
|
||||||
|
|
||||||
menu = this.makeMenu();
|
menu = this.makeMenu();
|
||||||
currentMenu = menu;
|
currentMenu = menu;
|
||||||
@ -1726,11 +1726,6 @@
|
|||||||
entry = _ref[_i];
|
entry = _ref[_i];
|
||||||
this.insertEntry(entry, menu, data);
|
this.insertEntry(entry, menu, data);
|
||||||
}
|
}
|
||||||
entry = $('.entry', menu);
|
|
||||||
while (prevEntry = this.findNextEntry(entry, -1)) {
|
|
||||||
entry = prevEntry;
|
|
||||||
}
|
|
||||||
this.focus(entry);
|
|
||||||
$.on(d, 'click', this.close);
|
$.on(d, 'click', this.close);
|
||||||
$.on(d, 'CloseMenu', this.close);
|
$.on(d, 'CloseMenu', this.close);
|
||||||
$.add(Header.hover, menu);
|
$.add(Header.hover, menu);
|
||||||
@ -1747,6 +1742,8 @@
|
|||||||
style.right = "" + right + "px";
|
style.right = "" + right + "px";
|
||||||
style.bottom = "" + bottom + "px";
|
style.bottom = "" + bottom + "px";
|
||||||
style.left = "" + left + "px";
|
style.left = "" + left + "px";
|
||||||
|
entry = $('.entry', menu);
|
||||||
|
this.focus(entry);
|
||||||
return menu.focus();
|
return menu.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -58,10 +58,6 @@ UI = do ->
|
|||||||
for entry in @entries
|
for entry in @entries
|
||||||
@insertEntry entry, menu, data
|
@insertEntry entry, menu, data
|
||||||
|
|
||||||
entry = $ '.entry', menu
|
|
||||||
while prevEntry = @findNextEntry entry, -1
|
|
||||||
entry = prevEntry
|
|
||||||
@focus entry
|
|
||||||
$.on d, 'click', @close
|
$.on d, 'click', @close
|
||||||
$.on d, 'CloseMenu', @close
|
$.on d, 'CloseMenu', @close
|
||||||
$.add Header.hover, menu
|
$.add Header.hover, menu
|
||||||
@ -87,6 +83,12 @@ UI = do ->
|
|||||||
style.bottom = "#{bottom}px"
|
style.bottom = "#{bottom}px"
|
||||||
style.left = "#{left}px"
|
style.left = "#{left}px"
|
||||||
|
|
||||||
|
entry = $ '.entry', menu
|
||||||
|
# We've removed flexbox, so we don't user order anymore.
|
||||||
|
# while prevEntry = @findNextEntry entry, -1
|
||||||
|
# entry = prevEntry
|
||||||
|
@focus entry
|
||||||
|
|
||||||
menu.focus()
|
menu.focus()
|
||||||
|
|
||||||
insertEntry: (entry, parent, data) ->
|
insertEntry: (entry, parent, data) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user