- From: 張俊芝 <notifications@github.com>
- Date: Thu, 29 Aug 2019 00:53:32 -0700
- To: w3c/selection-api <selection-api@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 29 August 2019 07:53:54 UTC
Sometimes, developer wants to know where the user attempts to move the caret in an editor, regardless whether it will actually succeed. For example, when the caret is already after the last character in the editor, if the user still presses the "move-forward" arrow(Say, right/down arrow in a horizontal-tb or vertical-lr editor; or left/down arrow in a vertical-rl editor) to continue moving forward, it will fail, but the developer may sometimes want to be informed of the user's failed attempt. One specific usage of such an event is implementing a syntax hightlighted editor, where each syntax unit is emulated by a contenteditable wrapup. Being able to informed of such failed attempts, it can be ensured technically correct to move among syntax units, without doing hacky code which may results in portability problems. Thoughts about this? I look forward to hearing from you. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/selection-api/issues/112
Received on Thursday, 29 August 2019 07:53:54 UTC