nextcloud-vue icon indicating copy to clipboard operation
nextcloud-vue copied to clipboard

fix(NcAppNavigationItem): Fix popper boundary element

Open ChristophWurst opened this issue 1 year ago • 3 comments

☑️ Resolves

  • For https://github.com/nextcloud/mail/issues/8474

The query selector in the computed prop ran too early, before the element existed. There is no reactivity. Now the boundary element is set very late at mount, when the boundary element does exist in the DOM.

There are a few edge cases, but the menu positions better than before when the boundary fell back to the body.

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🚧 Tasks

  • [x] ...

🏁 Checklist

  • [ ] ⛑️ Tests are included or are not applicable
  • [ ] 📘 Component documentation has been extended, updated or is not applicable
  • [x] 3️⃣ Backport to next requested with a Vue 3 upgrade

ChristophWurst avatar May 22 '24 19:05 ChristophWurst

I end up in the same scenario as you. I can reproduce the issue on main, then i link and the issue is gone. I do npm ci, kill the link and same as you i cannot reproduce it anymore.

GretaD avatar May 29 '24 08:05 GretaD

Let's do this. It sets the element more reliably. I don't see a downside.

ChristophWurst avatar Jun 26 '24 14:06 ChristophWurst

/backport to next

susnux avatar Jun 27 '24 05:06 susnux