Skip to content

Commit

Permalink
Merge pull request #5566 from nextcloud/fix/linkbubble_scroll_handler
Browse files Browse the repository at this point in the history
fix(LinkBubble): Limit hide on scroll to div elements
  • Loading branch information
mejo- authored Mar 25, 2024
2 parents 49601c7 + daac91d commit 1662a1a
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 1662a1a

Please sign in to comment.