Repository navigation
Conversation
LoukasPap
marked this pull request as ready for review
October 12, 2026 15:10
Contributor
Viewer previewCommit 0c5cf0c (build logs).
🔒 A user with write access must approve this commit with the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22159 +/- ##
==========================================
+ Coverage 90.30% 90.32% +0.02%
==========================================
Files 277 277
Lines 67956 68006 +50
==========================================
+ Hits 61367 61427 +60
+ Misses 6589 6579 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LoukasPap
marked this pull request as draft
October 12, 2026 21:14
Highlights, stamps and FreeText editors take the focus when they're added back, which scrolls their page into view. Ink editors only did that when they had to be committed, so undoing the deletion of an existing ink didn't navigate to it. Scroll the restored ink into view rather than focusing it: focusing also selects the editor, and undoing the deletion of several inks must not leave any of them selected. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
LoukasPap
force-pushed
the
fix/ink-undo-navigation
branch
from
October 12, 2026 21:39
687da22 to
0c5cf0c
Compare
Author
|
Test case |
LoukasPap
marked this pull request as ready for review
October 12, 2026 21:43
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a highlight or a comment is deleted and the deletion is undone, the viewer navigates to the page of the restored element. This didn't happen for an ink annotation.
The other editors (highlight, stamp, FreeText) call
div.focus()inonceAddedwhen they're added back, which scrolls their page into view.DrawingEditor.onceAddedonly focused the editor when it had to be committed (i.e. a freshly drawn stroke), so a restored ink was silently put back where it was.The fix scrolls the restored editor into view. Focusing it instead isn't an option here since it would also select it, and undoing the deletion of several inks must leave none of them selected.
Test cases
comments.pdf.