mirror of https://github.com/zulip/zulip.git
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:
parent
64146b8704
commit
246441bdcc
|
@ -183,7 +183,7 @@ export function initialize() {
|
||||||
// this button is finished. This is necessary because the fading animation
|
// this button is finished. This is necessary because the fading animation
|
||||||
// confuses Tippy's built-in `data-reference-hidden` feature.
|
// confuses Tippy's built-in `data-reference-hidden` feature.
|
||||||
$show_scroll_to_bottom_button.on("transitionend", (e) => {
|
$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;
|
const tooltip = $("#scroll-to-bottom-button-clickable-area")[0]._tippy;
|
||||||
// make sure the tooltip exists and the class is not currently showing
|
// make sure the tooltip exists and the class is not currently showing
|
||||||
if (tooltip && !$show_scroll_to_bottom_button.hasClass("show")) {
|
if (tooltip && !$show_scroll_to_bottom_button.hasClass("show")) {
|
||||||
|
|
Loading…
Reference in New Issue