Add ability to debounce of the toolbar show in the WidgetToolbarRepository
due to Google Chrome selection quirks.
#17690
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.
Suggested merge commit message (convention)
Fix (bookmark): Prevent bookmark popup flickering when clicking paragraphs with trailing bookmarks.
Additional information
When a widget (e.g., a bookmark anchor) is clicked, two consecutive
update
events may fire:While the widget usually stays selected, sometimes the selection may move to a different element (e.g., to the start of the parent paragraph). This can cause the toolbar to flicker as it's quickly shown and hidden.
This issue particularly affects widgets like anchors that contain a single SVG element. To prevent the flickering, we need to debounce the toolbar visibility updates.
Debounce is added as a flag because it does not apply to all HTML constructs, only selected ones.
Before
2024-12-23.10-11-39.mp4
After
after-fix-2024-12-23_16.41.38.mp4