Skip to content

Commit

Permalink
Update packages/ckeditor5-ui/src/tooltipmanager.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Kuba Niegowski <1232187+niegowski@users.noreply.github.com>
  • Loading branch information
Dumluregn and niegowski authored Oct 18, 2024
1 parent c87e63b commit aee3662
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ckeditor5-ui/src/tooltipmanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,10 @@ export default class TooltipManager extends /* #__PURE__ */ DomEmitterMixin() {
// Also, if the element has a class `ck-with-instant-tooltip`, the tooltip should be pinned immediately.
// This is useful for elements that have their content partially hidden (e.g. a long text in a small container)
// and should show a tooltip on hover, like merge field.
if ( evt.name === 'focus' && !elementWithTooltipAttribute.matches( ':hover' ) ||
elementWithTooltipAttribute.matches( '.ck-with-instant-tooltip' ) ) {
if (
evt.name === 'focus' && !elementWithTooltipAttribute.matches( ':hover' ) ||
elementWithTooltipAttribute.matches( '.ck-with-instant-tooltip' )
) {
this._pinTooltip( elementWithTooltipAttribute, getTooltipData( elementWithTooltipAttribute ) );
} else {
this._pinTooltipDebounced( elementWithTooltipAttribute, getTooltipData( elementWithTooltipAttribute ) );
Expand Down

0 comments on commit aee3662

Please sign in to comment.