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

[stable8] fix(NcModal): use useTrapStackControl for pausing other focus traps

Open backportbot[bot] opened this issue 6 months ago • 1 comments

Backport of #7084

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • [x] Review and resolve any conflicts
  • [ ] Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

backportbot[bot] avatar Jun 24 '25 11:06 backportbot[bot]

Maybe it's another issue 🤔

Steps: Talk -> Mobile width -> Expand left sidebar -> Open 'New conversation' dialog

In Vue 3: image there is only latest trap in the stack

In Vue 2: image left sidebar trap is paused, but focus is still trapped there. so should remain deactivated as before

Antreesy avatar Jun 24 '25 13:06 Antreesy

Hello @Antreesy please what is the status of this? There is a bug where NcModal.clearFocusTrap() attempts to reactivate external focus traps no longer have valid DOM containers when cleaning up password dialogs spawned from NcActionInput contexts.

This can be seen in Nextcloud -> accounts -> create new group | rename group

After some spiraling from nextcloud/password-confirmation to nextcloud/dialogs it appears this is the fix which is still absent from the current stable used in nextcloud/server.

nfebe avatar Aug 09 '25 14:08 nfebe

As written above, same fix isn't working with Vue2 Current state will remove an error coming from password-confirmation library, but break all places with 2+ active focus traps

Antreesy avatar Aug 12 '25 08:08 Antreesy

https://github.com/nextcloud-libraries/nextcloud-vue/pull/7304

susnux avatar Aug 18 '25 17:08 susnux