Problem/Motivation

The tooltip uses an empty anchor tag and because of that the user gets sent to the top of the page when the tooltip is clicked (or touched on mobile).

Proposed resolution

Add a preventDefault on click and on touch events.

Comments

bbombachini created an issue. See original summary.

bbombachini’s picture

StatusFileSize
new523 bytes
bbombachini’s picture

Status: Active » Needs review
bbombachini’s picture

StatusFileSize
new821 bytes

There was an issue with the other patch so I'm adding a new, more complete one.

bbombachini’s picture

StatusFileSize
new797 bytes

Sorry, also realized that there was an issue when there were multiple tooltips on a page, so this patch should take that into consideration.

  • bbombachini authored b1356dc on 4.x
    Issue #3212634 by bbombachini: Tooltip on click or touch scrolls to the...
bbombachini’s picture

Status: Needs review » Fixed
bbombachini’s picture

Version: 8.x-3.0 » 4.0.0
bbombachini’s picture

Status: Fixed » Closed (fixed)