forked from 0x2620/oxjs
temporary fix for parseKeyboard bug
This commit is contained in:
parent
9eb96ea54c
commit
4363c8dac1
3 changed files with 198 additions and 136 deletions
|
|
@ -212,6 +212,10 @@ requires
|
|||
}
|
||||
return {
|
||||
bind: function(id, event, callback) {
|
||||
if (arguments.length == 2) {
|
||||
callback = event;
|
||||
event = id;
|
||||
}
|
||||
if (isKeyboardEvent(event)) {
|
||||
keyboardEvents[id] = keyboardEvents[id] || {};
|
||||
keyboardEvents[id][event] = callback;
|
||||
|
|
@ -2849,7 +2853,7 @@ requires
|
|||
self.$items[pos].appendTo(self.$pages[page]);
|
||||
});
|
||||
if (self.options.type == "text" && page == 0) {
|
||||
var height = that.height(),
|
||||
var height = that.height() - (that.width() < that.$content.width() ? oxui.scrollbarSize : 0),
|
||||
visibleItems = Math.ceil(height / self.options.itemHeight);
|
||||
if (result.data.items.length < visibleItems) {
|
||||
self.$pages[page].height(height).css({
|
||||
|
|
@ -4267,6 +4271,7 @@ requires
|
|||
);
|
||||
|
||||
function parseKeyboard(str) {
|
||||
if (Ox.isObject(str)) return str; // fixme: this should not happen
|
||||
var modifiers = str.split(" "),
|
||||
key = modifiers.pop();
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue