mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 21:26:22 +00:00
LibWeb: Improve caret positioning behavior inside fragments
When clicking on a glyph or starting a selection on it, we would use the glyph's offset/index as the position which represents the left side of the glyph, or the position between the glyph and the glyph before it. Instead of looking at which glyph is under the mouse pointer, look at which glyph boundary is closer. Now, if you click to the right of a glyph (but still on that glyph), it correctly selects the next glyph's offset as the position.
This commit is contained in:
parent
408165d2f4
commit
dbbdf2cebc
Notes:
github-actions[bot]
2025-06-13 13:09:58 +00:00
Author: https://github.com/gmta
Commit: dbbdf2cebc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5067
Reviewed-by: https://github.com/tcl3
Reviewed-by: https://github.com/trflynn89
4 changed files with 18 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
<#text>
|
||||
index: 1
|
||||
index: 2
|
||||
<BODY>
|
||||
---
|
||||
<#text>
|
||||
|
@ -7,7 +7,7 @@ index: 1
|
|||
<B id="b1">
|
||||
---
|
||||
<#text>
|
||||
index: 1
|
||||
index: 2
|
||||
<DIV id="d1">
|
||||
---
|
||||
<#text>
|
||||
|
|
|
@ -1 +1 @@
|
|||
192
|
||||
193
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue