primevue icon indicating copy to clipboard operation
primevue copied to clipboard

Tooltip: Unavailable configuration breaks z-index

Open franklx opened this issue 2 years ago • 0 comments

Describe the bug

The z-index mechanism provided by utils/ZIndexUtils get broken by a bug in the Tooltip component. In the beforeMount hook component loads config.zIndex.tooltip from options.instance.$primevue that is undefined ( tooltip/Tooltip.js). Being $_ptooltipZIndex undefined breaks z-index stack provided by ZIndexUtils.add/clear affecting other components. Apart from fixing the bug a sensible default should be provided (1100 for example).

Reproducer

No response

PrimeVue version

3.16.2

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Create a simple view like this:
<Dialog>
    <Button v-tooltip="test tooltip">
   <Dropdown options="...">
</Dialog>
  1. Open dropdown: it should work
  2. Hover on button triggering tooltip
  3. Tooltip will not work
  4. Dropdown doesn't work anymore: dropdown overlay will be behind dialog

Expected behavior

No response

franklx avatar Sep 08 '22 06:09 franklx