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

Popover - Misplaced arrow #5915

Closed
Synar opened this issue Jun 18, 2024 · 9 comments · Fixed by #5975
Closed

Popover - Misplaced arrow #5915

Synar opened this issue Jun 18, 2024 · 9 comments · Fixed by #5975
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Synar
Copy link

Synar commented Jun 18, 2024

Describe the bug

The arrow of the popover is incorrectly placed, off to the left of the target element.

This issue is also present in primevue's very own website, in the documentation of the v4 version of popover (the issue was absent in v3), making it easy to reproduce. I got it both on my pixel's chrome and on firefox on my desktop.

Reproducer

https://primevue.org/popover/

Screenshot_20240619-105204.png

Screenshot_20240619-105146.png

PrimeVue version

4

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

Go to https://primevue.org/popover/, click on any of the example buttons triggering a popover to be displayed

Expected behavior

Arrow aligns itself to the target

@Synar Synar added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 18, 2024
@multun
Copy link

multun commented Jun 20, 2024

I can reproduce this behavior with the ConfirmationPopup as well, on wider screens, even in the documentation example, by aligning buttons to the right of the screen:
2024-06-20_11-06-1718874474

@multun
Copy link

multun commented Jun 20, 2024

This is a regression from Primevue 3.52, where the same example works fine:
2024-06-20_11-06-1718877117

multun added a commit to multun/primevue that referenced this issue Jun 20, 2024
This change fixes a regression introduced by refactoring the calc variable into dt:

- fix dt key mismatch between the stylesheet and js component
- add back the 1.25rem margin to match what used to be done in the previous release

Fix primefaces#5915
@blouflashdb
Copy link

I have the same problem.

@multun
Copy link

multun commented Jun 20, 2024

@blouflashdb can you please confirm this change fixes the issue?

@blouflashdb
Copy link

@blouflashdb can you please confirm this change fixes the issue?

how can I test your PR?

@multun
Copy link

multun commented Jun 20, 2024

@blouflashdb

If you're OK with using a build I made

In your package.json, remove previous references to primevue, and add the following:

    "@primevue/auto-import-resolver": "https://dl.multun.net/primeview-pr-5934/primevue-auto-import-resolver-4.0.0-rc.2.tgz",
    "@primevue/core": "https://dl.multun.net/primeview-pr-5934/primevue-core-4.0.0-rc.2.tgz",
    "@primevue/icons": "https://dl.multun.net/primeview-pr-5934/primevue-icons-4.0.0-rc.2.tgz",
    "@primevue/metadata": "https://dl.multun.net/primeview-pr-5934/primevue-metadata-4.0.0-rc.2.tgz",
    "@primevue/nuxt-module": "https://dl.multun.net/primeview-pr-5934/primevue-nuxt-module-4.0.0-rc.2.tgz",
    "@primevue/themes": "https://dl.multun.net/primeview-pr-5934/primevue-themes-4.0.0-rc.2.tgz",
    "primevue": "https://dl.multun.net/primeview-pr-5934/primevue-4.0.0-rc.2.tgz",

If you're not OK with using a build I made

I'm not aware of the less cursed ways of doing this. If anyone is aware of a better way to do this, please point it out.

  1. Clone my fork and checkout my branch git clone -b fix-popup-arrow-offset [email protected]:multun/primevue.git primevue-pr
  2. Build and pack all packages in the primevue workspace:
cd primevue-pr
mkdir dist
dist_dir="$(realpath dist)"
for package in packages/*; do pushd "$package"; pnpm pack --pack-destination "$dist_dir"; popd; done
  1. get the path to each package .tgz dist, and use file: references to install these in your project
    "@primevue/auto-import-resolver": "file:/PATH_TO_DIST/primevue-auto-import-resolver-4.0.0-rc.2.tgz",
    "@primevue/core": "file:/PATH_TO_DIST/primevue-core-4.0.0-rc.2.tgz",
    "@primevue/icons": "file:/PATH_TO_DIST/primevue-icons-4.0.0-rc.2.tgz",
    "@primevue/metadata": "file:/PATH_TO_DIST/primevue-metadata-4.0.0-rc.2.tgz",
    "@primevue/nuxt-module": "file:/PATH_TO_DIST/primevue-nuxt-module-4.0.0-rc.2.tgz",
    "@primevue/themes": "file:/PATH_TO_DIST/primevue-themes-4.0.0-rc.2.tgz",
    "primevue": "file:/PATH_TO_DIST/primevue-4.0.0-rc.2.tgz",

@jeverduzco
Copy link

I have the same issue with V4.

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 1, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.0.4 milestone Aug 1, 2024
@AleeeKoi
Copy link

Hello, I'm facing the same issue, is it not fixed yet?

@AutoAwesome
Copy link

I have also the same issue in 2025 :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
7 participants