Skip to content

Commit

Permalink
fix(LinkBubble): Limit hide on scroll to div elements
Browse files Browse the repository at this point in the history
Don't hide e.g. when scrolling in an input element.

Fixes: #5497

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Mar 25, 2024
1 parent dc3f642 commit daac91d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/LinkBubblePluginView.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ class LinkBubblePluginView {
}

dragOrScrollHandler = (event) => {
// Only hide when scrolling on `<div>` (not .e.g. on `<input>`)
if (event.target.nodeName !== 'DIV') {
return
}

// Cypress fires unexpected scroll events, which breaks testing the link bubble
if (window.Cypress) {
return
}

this.hide()
}

Expand Down

0 comments on commit daac91d

Please sign in to comment.