Input selectionStart does not reflect the drop events
Reported by
biff.can...@gmail.com,
Sep 10
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36 Steps to reproduce the problem: 1. Create an input 2. Register handler for drop and dropover events 3. Observe selectionStart and selectionEnd properties of the input elements What is the expected behavior? The selectionStart and selectionEnd properties should reflect the current mouse position of the drop target What went wrong? The selectionStart and selectionStart are only updated after the drop event is handled by default handler, there is no easy way to cursor position of the drop. Did this work before? No Chrome version: 69.0.3497.81 Channel: stable OS Version: 10.0 Flash Version: There is no precise definition in HTML5 that the drop event should have a cursor position but it will be really nice if we have it like the system default handler has.
,
Sep 10
,
Sep 11
,
Sep 26
Mark WontFix since Chrome works as expected. Drag-and-drop caret and selection caret are different entity. DnD-Caret doesn't move selection in text field.
,
Sep 29
So, then how to get DnD caret position just before the drop? Right now, it's only possible to get the selection after the native drop is completed, so taht, if we want restring the input with only letters and digits we cannot do it before the drop, only after it complets we could get the resulted value and remove the selection if it does not match the criteria. As I said initially this is not a big deal but it will be a nice future if it's possible to restrict the input before than making corrections after. |
||||
►
Sign in to add a comment |
||||
Comment 1 by biff.can...@gmail.com
, Sep 10