Skip to content

fix(highlight): getBoundingRect to handle negative y-axis#637

Merged
mergify[bot] merged 3 commits intobox:masterfrom
ConradJChan:fix-highlight-scroll
Nov 18, 2020
Merged

fix(highlight): getBoundingRect to handle negative y-axis#637
mergify[bot] merged 3 commits intobox:masterfrom
ConradJChan:fix-highlight-scroll

Conversation

@ConradJChan
Copy link
Contributor

Number.MIN_VALUE is actually the smallest positive number closest to zero. Combined with negative y-axis values for client rects (which happens when the text selection is involved with a vertical page scroll) resulted in incorrect logic when attempting to smoothen and combine the rects.

Before

highlight-select-before

After

highlight-select-after

@ConradJChan ConradJChan requested a review from a team as a code owner November 17, 2020 05:51
@mergify mergify bot merged commit eb98ddb into box:master Nov 18, 2020
@ConradJChan ConradJChan deleted the fix-highlight-scroll branch November 18, 2020 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants