From 0b7a31c424c69a10b9b9592343924a2d5793f5b0 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Tue, 4 Jan 2011 02:37:33 +0000 Subject: [PATCH] fix for bug where calling blur with empty focus stack would push an undefined element onto the stack --- build/js/ox.ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 7d85be8..32c9e9b 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -411,7 +411,7 @@ requires blur: function(id) { Ox.print('BLUR', id, stack) var index = stack.indexOf(id); - if (index == stack.length - 1) { + if (index > -1 && index == stack.length - 1) { stack.length == 1 ? stack.pop() : stack.splice(stack.length - 2, 0, stack.pop()); // fix later: Ox.Event.unbindKeyboard($elements[id].options('id'));