forked from 0x2620/oxjs
don't throw errors in menu when accessing non-existing items
This commit is contained in:
parent
12622724ee
commit
314788dd24
2 changed files with 14 additions and 7 deletions
|
|
@ -26,7 +26,8 @@ Ox.Focus = (function() {
|
|||
: stack.splice(stack.length - 2, 0, stack.pop());
|
||||
//$elements[id].removeClass('OxFocus');
|
||||
$('.OxFocus').removeClass('OxFocus'); // fixme: the above is better, and should work
|
||||
stack.length && Ox.UI.elements[stack[stack.length - 1]].addClass('OxFocus');
|
||||
stack.length && Ox.UI.elements[stack[stack.length - 1]]
|
||||
.addClass('OxFocus').triggerEvent('focus');
|
||||
Ox.Log('Core', 'blur', id, stack);
|
||||
}
|
||||
},
|
||||
|
|
@ -41,7 +42,8 @@ Ox.Focus = (function() {
|
|||
stack.push(id);
|
||||
$('.OxFocus').removeClass('OxFocus'); // fixme: see above
|
||||
Ox.Log('Core', 'focus', id, stack);
|
||||
Ox.UI.elements[id].addClass('OxFocus');
|
||||
Ox.UI.elements[id]
|
||||
.addClass('OxFocus').triggerEvent('focus');
|
||||
}
|
||||
},
|
||||
/*@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue