Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/js/_enqueues/wp/wp-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

const popovers = /** @type {NodeListOf<HTMLSpanElement>} */ ( document.querySelectorAll( '.wp-is-tooltip' ) );

/** @type {ReturnType<typeof setTimeout>} */
let openTimeout;

popovers.forEach( function( popover ) {
const trigger = /** @type {HTMLButtonElement|HTMLAnchorElement|null} */ ( popover.querySelector( '.wp-tooltip__toggle' ) );
const panel = /** @type {HTMLSpanElement|null} */ ( popover.querySelector( 'span.wp-tooltip__bubble' ) );
Expand All @@ -31,6 +28,9 @@
return;
}

/** @type {ReturnType<typeof setTimeout>} */
let openTimeout;

// Show Tooltip Function (with delay to prevent flickering).
const showTooltip = () => {
clearTimeout( openTimeout );
Expand Down
Loading