serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibWeb: Update the cursor position when an editable element is clicked

Open tcl3 opened this issue 1 year ago • 0 comments

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

tcl3 avatar Feb 08 '24 21:02 tcl3