Fixed #4737 - Tooltip: autoHide does not work properly
parent
1d365fd480
commit
1448e92459
|
@ -152,7 +152,6 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
||||||
onMouseLeave(event) {
|
onMouseLeave(event) {
|
||||||
const el = event.currentTarget;
|
const el = event.currentTarget;
|
||||||
const hideDelay = el.$_ptooltipHideDelay;
|
const hideDelay = el.$_ptooltipHideDelay;
|
||||||
|
|
||||||
const autoHide = el.$_ptooltipAutoHide;
|
const autoHide = el.$_ptooltipAutoHide;
|
||||||
|
|
||||||
if (!autoHide) {
|
if (!autoHide) {
|
||||||
|
@ -282,7 +281,8 @@ const Tooltip = BaseTooltip.extend('tooltip', {
|
||||||
role: 'tooltip',
|
role: 'tooltip',
|
||||||
style: {
|
style: {
|
||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
width: el.$_ptooltipFitContent ? 'fit-content' : undefined
|
width: el.$_ptooltipFitContent ? 'fit-content' : undefined,
|
||||||
|
pointerEvents: el.$_ptooltipAutoHide && 'none'
|
||||||
},
|
},
|
||||||
class: [!this.isUnstyled() && this.cx('root'), el.$_ptooltipClass],
|
class: [!this.isUnstyled() && this.cx('root'), el.$_ptooltipClass],
|
||||||
'p-bind': this.ptm('root', {
|
'p-bind': this.ptm('root', {
|
||||||
|
|
|
@ -5,7 +5,6 @@ const css = `
|
||||||
.p-tooltip {
|
.p-tooltip {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
display:none;
|
display:none;
|
||||||
pointer-events: none;
|
|
||||||
padding: .25em .5rem;
|
padding: .25em .5rem;
|
||||||
max-width: 12.5rem;
|
max-width: 12.5rem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue