serenity
serenity copied to clipboard
LibWeb: Update the cursor position when an editable element is clicked
With this change, clicking on an editable element, such as an input
or textarea
causes the cursor position to be updated to the current mouse position.
The behavior of the cursor still isn't perfect. It has a tendency to jump around unexpectedly if you drag at all when clicking. Dragging to create a selection also isn't currently working as expected.
Before:
https://github.com/SerenityOS/serenity/assets/2817754/9d60baff-0157-4778-a50a-ce8d37a4e7e5
After:
https://github.com/SerenityOS/serenity/assets/2817754/eb691e49-b690-4316-af89-ada3d5d36e11