Created
May 18, 2013 09:18
-
-
Save sunnycyk/5603832 to your computer and use it in GitHub Desktop.
Code to fix IE 10 placeholder bug for Angular JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config(['$provide', function($provide) { | |
$provide.decorator('$sniffer', ['$delegate', function($sniffer) { | |
var msie = parseInt((/msie (\d+)/.exec(angular.lowercase(navigator.userAgent)) || [])[1], 10); | |
var _hasEvent = $sniffer.hasEvent; | |
$sniffer.hasEvent = function(event) { | |
if (event === 'input' && msie === 10) { | |
return false; | |
} | |
_hasEvent.call(this, event); | |
} | |
return $sniffer; | |
}]); | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment