Our application uses selectionStart on input fields to determine whether to automatically move the user to the next/previous field when they press the arrow keys (ie, when the selection is at the end of the text and the user presses the right arrow we move to the next field, otherwise)
Chrome now prevents selectionStart from being used where type="number". It now throws the exception:
Failed to read the 'selectionStart' property from 'HTMLInputElement': The input element's type ('number') does not support selection.
See following:
https://codereview.chromium.org/100433008/#ps60001
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#do-not-apply
Is there any way to determine the location of the caret in an input field of type="number"?
Watch out for false positive on this in Angular if using Chrome's device testing mode.
So this is clearly Chrome and not an actual iPhone - yet the error still gets raised because
_platform.IOS
returns true and thensetSelectionRange
subsequently fails.This is Angular - but similar issues may exist in other frameworks / environments.