RESOLVED CONFIGURATION CHANGED 156500
Do not throw when getting selectionDirection/selectionStart/selectionEnd on input
https://bugs.webkit.org/show_bug.cgi?id=156500
Summary Do not throw when getting selectionDirection/selectionStart/selectionEnd on i...
Simon Pieters (:zcorpan)
Reported 2016-04-12 03:30:23 PDT
See https://github.com/whatwg/html/pull/1006 var input = document.createElement('input'); input.type = 'checkbox'; input.selectionDirection; // should return null input.selectionStart; // should return null input.selectionEnd; // should return null
Attachments
Chris Dumez
Comment 1 2016-04-12 08:57:17 PDT
I am not against this change but I am slightly worried about backward compatibility here. I think I'll wait a bit before implementing this.
Radar WebKit Bug Importer
Comment 2 2016-04-12 08:58:07 PDT
Chris Dumez
Comment 3 2016-07-21 09:07:55 PDT
Chrome 52 and Firefox 47 still throw in this case.
Ahmad Saleem
Comment 4 2022-08-08 16:59:52 PDT
I am not sure whether I am testing correctly here but when I copy the following snippet from Comment 0 into JSfiddle, I get following behavior across browsers: Link - https://jsfiddle.net/sun1vzxq/show *** Safari 15.6 on macOS 12.5 *** Error in console - "<a class='gotoLine' href='#43:6'>43:6</a> TypeError: Type error" *** Firefox Nightly 105 *** No error in console *** Chrome Canary 106 *** No error in console ______ Just wanted to share updated results. Thanks!
Simon Pieters (:zcorpan)
Comment 5 2022-08-09 08:03:50 PDT
It seems this is fixed in Safari TP 148 (Safari 16.0, WebKit 17614.1.17.1) http://software.hixie.ch/utilities/js/live-dom-viewer/saved/10540 log: object "null" (0 props) log: object "null" (0 props) log: object "null" (0 props)
Ahmad Saleem
Comment 6 2022-08-09 08:23:33 PDT
Indeed, it is fixed in Safari Technical Preview 150. Thanks for bump simon@bocoup.com.. I am going to mark this as "RESOLVED CONFIGURATION CHANGED".
Note You need to log in before you can comment on or make changes to this bug.