我们的应用程序在输入字段上使用 selectionStart 来确定当用户按下箭头键时是否自动将用户移动到下一个/上一个字段(例如,当选择在文本末尾,用户按下右箭头时,我们将移动到下一个字段,否则)
Chrome 现在可以防止在 type = “ number”的位置使用 selectionStart。 它现在抛出了一个例外:
Failed to read the 'selectionStart' property from 'HTMLInputElement': The input element's type ('number') does not support selection.
见下表:
Https://codereview.chromium.org/100433008/#ps60001
Http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#do-not-apply
是否有办法确定插入符号在 type = “ number”的输入字段中的位置?