Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few text selection issues #607

Merged
merged 3 commits into from
Nov 23, 2024
Merged

Conversation

poire-z
Copy link
Contributor

@poire-z poire-z commented Nov 22, 2024

lvtinydom: add printf to debug global hash mismatch

Needed when investigating koreader/koreader#8613 (comment), so good to keep that at hand.

lvtinydom: createXPointer(): better handle <br/> edge cases

Fix text selection when starting/ending selection on a blank line created by <br/><br/> (which would just not work) or at the end of a paragraph ending with <br/> (which would select the full paragraph).
Noticed while working on fixing koreader/koreader#12135.

lvtinydom: getSegmentRects(): fix possible infinite loop

It would be stuck on an infinite loop when selected text would span over a line full of spaces, which could happen with "white-space: pre".
Noticed at #584 (comment).


This change is Reviewable

@poire-z
Copy link
Contributor Author

poire-z commented Nov 22, 2024

@benoit-pierre : can we solve this ? Or should we just go on?

  http://ftp.debian.org/debian/pool/main/libu/libunibreak/libunibreak-dev_6.1-2_amd64.deb
Reusing existing connection to ftp.debian.org:80.
HTTP request sent, awaiting response... 404 Not Found

@benoit-pierre
Copy link
Contributor

@benoit-pierre : can we solve this ? Or should we just go on?

  http://ftp.debian.org/debian/pool/main/libu/libunibreak/libunibreak-dev_6.1-2_amd64.deb
Reusing existing connection to ftp.debian.org:80.
HTTP request sent, awaiting response... 404 Not Found

See #608.

Fix text selection when starting/ending selection on
a blank line created by <br/><br/> (which would just not
work) or at the end of a paragraph ending with <br/>
(which would select the full paragraph).
It would be stuck on an infinite loop when selected
text would span over a line full of spaces, which
could happen with "white-space: pre".
@poire-z poire-z merged commit aad5b46 into koreader:master Nov 23, 2024
1 check passed
@poire-z poire-z deleted the misc_202411 branch November 23, 2024 21:54
benoit-pierre added a commit to benoit-pierre/koreader-base that referenced this pull request Nov 24, 2024
Frenzie pushed a commit to koreader/koreader-base that referenced this pull request Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants