Skip to content

Conversation

@PVince81
Copy link
Contributor

@PVince81 PVince81 commented Aug 22, 2022

Add Modal example with another one on top to test focus trap.

The focus trap seems to work fine.

There's a bug though: when I submit the second dialog, instead of closing, I get this in the console:
[Vue warn]: Error in nextTick: "NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node."

This was an attempt to reproduce nextcloud/server#33637

Add Modal example with another one on top to test focus trap.

Signed-off-by: Vincent Petry <[email protected]>
@PVince81 PVince81 self-assigned this Aug 22, 2022
@PVince81 PVince81 added the 2. developing Work in progress label Aug 22, 2022
@PVince81 PVince81 added this to the 6.0.0 milestone Aug 22, 2022
@CarlSchwan
Copy link
Contributor

I wonder if we shouldn't use the native dialog element https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog instead of trying to mess in js the focus order

@PVince81
Copy link
Contributor Author

wow, the dialog element looks pretty recent, I never heard of it before.

the focus trap seemed fine though and I don't think we should switch tech at this point.
would still be good to try it out separately

@PVince81
Copy link
Contributor Author

I discovered that the case I tried to reproduce was different: it was a legacy non-vue dialog appearing on top of a vue dialog. In such case the focus trap of the parent will definitely not stop. Ideal solution: port all dialogs to Vue.

see: nextcloud/server#33516 (comment)

but if not enough we might want to add a function to pause the focus trap on the current dialog.

@juliusknorr juliusknorr modified the milestones: 6.0.0, 7.0.0 Sep 1, 2022
@jotoeri jotoeri modified the milestones: 7.0.0, 7.0.1 Oct 12, 2022
@nickvergessen nickvergessen modified the milestones: 7.0.1, 7.0.2 Oct 25, 2022
@skjnldsv skjnldsv modified the milestones: 7.0.2, 7.1.1 Nov 16, 2022
@skjnldsv skjnldsv modified the milestones: 7.1.1, 7.2.0 Dec 6, 2022
@skjnldsv skjnldsv modified the milestones: 7.2.0, 7.2.1 Dec 16, 2022
@skjnldsv skjnldsv modified the milestones: 7.3.1, 7.4.1 Jan 11, 2023
@Pytal Pytal modified the milestones: 7.4.1, 7.6.0 Jan 20, 2023
@PVince81
Copy link
Contributor Author

abandoned/obsolete

@PVince81 PVince81 closed this Jan 24, 2023
@PVince81 PVince81 deleted the modal-focus-trap-two-dialogs branch January 24, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants