Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip: Unavailable configuration breaks z-index #2946

Closed
franklx opened this issue Sep 8, 2022 · 4 comments
Closed

Tooltip: Unavailable configuration breaks z-index #2946

franklx opened this issue Sep 8, 2022 · 4 comments

Comments

@franklx
Copy link
Contributor

franklx commented Sep 8, 2022

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 franklx added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Sep 8, 2022
@tugcekucukoglu
Copy link
Member

I've tried to create an example using vite-quickstart, but could not replicate the issue.

Did you have a codesandbox link or a repo, to replicate the issue?

@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Oct 21, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this Oct 21, 2022
@emp-mas
Copy link

emp-mas commented Oct 21, 2022

Hi,

we experienced the same issue in components using script setup syntax.

@tugcekucukoglu
Here is a working example: primevue-tooltip-z-index-issue (fork of primevue-quickstart-vite)
Should be the same problem as in issue #3144

@tugcekucukoglu
Copy link
Member

We will check it again. Thanks for the repo.

@tugcekucukoglu tugcekucukoglu added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Oct 26, 2022
@tugcekucukoglu
Copy link
Member

Please follow this ticket #2468

You could use

<script setup>
import { usePrimeVue } from "primevue/config";

const $primevue = usePrimeVue();
defineExpose({
     $primevue
})
</script>

@tugcekucukoglu tugcekucukoglu removed the Status: Pending Review Issue or pull request is being reviewed by Core Team label Oct 26, 2022
@tugcekucukoglu tugcekucukoglu removed their assignment Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants