Skip to content

Commit

Permalink
Fix #2658: Tooltip don't remove zindex if autohide=false (#2665)
Browse files Browse the repository at this point in the history
Co-authored-by: mertsincan <[email protected]>
  • Loading branch information
melloware and mertsincan authored Mar 29, 2022
1 parent d9bb8a1 commit da41bdd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/lib/tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ export const Tooltip = forwardRef((props, ref) => {

if (visibleState) {
DomHandler.removeClass(currentTargetRef.current, getTargetOption(currentTargetRef.current, 'classname'));

sendCallback(props.onBeforeHide, { originalEvent: e, target: currentTargetRef.current });
applyDelay('hideDelay', () => {
ZIndexUtils.clear(elementRef.current);
DomHandler.removeClass(elementRef.current, 'p-tooltip-active');

if (!isAutoHide() && allowHide.current === false) {
return;
}

ZIndexUtils.clear(elementRef.current);
DomHandler.removeClass(elementRef.current, 'p-tooltip-active');

setVisibleState(false);
setPositionState(props.position);
Expand Down

0 comments on commit da41bdd

Please sign in to comment.