From 4c1e5075755eb3bccc3a24af37b2e3602ca063a2 Mon Sep 17 00:00:00 2001 From: JesLabs Date: Mon, 17 Mar 2014 17:04:51 +0100 Subject: [PATCH] Update jquery.numeric.js IE 11 support. document.selection is no longer supported in IE 11 (http://msdn.microsoft.com/en-us/library/ie/ms535869%28v=vs.85%29.aspx). --- numeric/jquery.numeric.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numeric/jquery.numeric.js b/numeric/jquery.numeric.js index bfc79c1..5257b28 100644 --- a/numeric/jquery.numeric.js +++ b/numeric/jquery.numeric.js @@ -245,7 +245,7 @@ $.fn.removeNumeric = function() // Based on code from http://javascript.nwbox.com/cursor_position/ (Diego Perini ) $.fn.getSelectionStart = function(o) { - if (o.createTextRange) + if (document.selection) { var r = document.selection.createRange().duplicate(); r.moveEnd('character', o.value.length); @@ -257,7 +257,7 @@ $.fn.getSelectionStart = function(o) // Based on code from http://javascript.nwbox.com/cursor_position/ (Diego Perini ) $.fn.getSelectionEnd = function(o) { - if (o.createTextRange) { + if (document.selection) { var r = document.selection.createRange().duplicate() r.moveStart('character', -o.value.length) return r.text.length