tooltips: Hide scroll button tooltip under transition.

Fix a bug where scroll to bottom tooltip remains
visible even after the button dissapeared.
This was fixed in #29253 but the fix does not work
for the updated jquery event handling.
This updated fix bypasses the jquery wrapper to
access the exact propertyName.

Fixes: #28656
This commit is contained in:
shashank-23002 2024-03-26 17:00:21 +00:00 committed by Tim Abbott
parent 64146b8704
commit 246441bdcc
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ export function initialize() {
// this button is finished. This is necessary because the fading animation
// confuses Tippy's built-in `data-reference-hidden` feature.
$show_scroll_to_bottom_button.on("transitionend", (e) => {
if (e.propertyName === "visibility") {
if (e.originalEvent.propertyName === "visibility") {
const tooltip = $("#scroll-to-bottom-button-clickable-area")[0]._tippy;
// make sure the tooltip exists and the class is not currently showing
if (tooltip && !$show_scroll_to_bottom_button.hasClass("show")) {