From aa70e83418910f31d6ae7203f5c16d2ba806d3d0 Mon Sep 17 00:00:00 2001 From: David Spigarelli Date: Fri, 1 Nov 2013 12:22:04 -0400 Subject: [PATCH] Defensive check around e.preventDefault in onFocus --- src/selectize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selectize.js b/src/selectize.js index 41627e160..5bbed3202 100644 --- a/src/selectize.js +++ b/src/selectize.js @@ -493,7 +493,7 @@ $.extend(Selectize.prototype, { self.isFocused = true; if (self.isDisabled) { self.blur(); - e.preventDefault(); + e && e.preventDefault(); return false; } @@ -1815,4 +1815,4 @@ $.extend(Selectize.prototype, { return html; } -}); \ No newline at end of file +});