Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This causes issues on Safari (see mozilla#12592 and mozilla#13191). Just removing the line fixes the issues and no difference / regression in behavior was observed without the `event.target.setSelection(0, 0);` bit in other browsers (including Firefox). The blur (switching focus out of the control) does effectively achieve the same thing in all browsers I have tested on. Tested specifically in Firefox with 1. inspect a `TextWidgetAnnotation` `input` element 2. `$0.setSelectionRange = (a, b) => console.warn(a, b);` 3. type `wow` and select `wow` in the input element 4. click/tab/tap outside the input element 5. <kbd>CTRL</kbd> + <kbd>C</kbd> ➡ no `wow` ✔ copied 6. <kbd>CTRL</kbd> + <kbd>V</kbd> ➡ confirmed
- Loading branch information