From 6712a22cf7c453178e8263ee211ea6ab0b06e4a2 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 22 Jul 2015 11:37:41 +0200 Subject: [PATCH] ingore exception on focus on disabled element Ignore exception when trying to focus on a disabled element using IE8 --- src/jquery.tokeninput.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jquery.tokeninput.js b/src/jquery.tokeninput.js index 4b69d823..e76b885f 100755 --- a/src/jquery.tokeninput.js +++ b/src/jquery.tokeninput.js @@ -1068,7 +1068,11 @@ function focusWithTimeout(object) { setTimeout( function() { - object.focus(); + try { + object.focus(); + } catch(e) { + // ignore exception + } }, 50 );