Wednesday 15 May 2013

Windows Phone 8. autocapitalize not supported in IE10 -


IOS & amp; Android, their webkit browsers support the property to autocapulate on an input element, to control that the first word of the sentence is capitalized.

On Windows Phone 8 IE10, this does not work. Does anyone know the exact way to get auto-capitalization in IE10 on Windows Phone?

If it is not supported then you have to do it via javascript assume that the key and / or Changes are being removed from the mobile browser, you can easily hook these events and convert the input value accordingly.

Here's an example, which changes the first letter that might already be a whitespace, and after a period the first letter is made by whitespace:

 on  $ ('[autocapitalize =' ']') 'Change key', function (event) {var selectStart = event.target.selectionStart; Var selections = event.target.selectionEnd; Var element = $ (this); Element.val (element.val (). Replace (/ ^ \ S * (.) | \. \ S + (.) / G, function (letter) {return letter.toUpperCase ();})); Event.target.setSelectionRange (selectStart, Selectionind);});   



No comments:

Post a Comment