1
0
Fork 0
forked from 0x2620/oxjs

temporary fix for parseKeyboard bug

This commit is contained in:
Rolux 2010-07-05 18:52:12 +02:00
commit 4363c8dac1
3 changed files with 198 additions and 136 deletions

View file

@ -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 {