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

fix(NcModal): fix focus-trap fallback #4266

Merged
merged 1 commit into from Jun 26, 2023
Merged

Conversation

skjnldsv
Copy link
Contributor

Fix #4265

Sometimes the content is empty or not ready yet.

fallbackFocus {HTMLElement | SVGElement | string | () => HTMLElement | SVGElement | string}: By default, an error will be thrown if the focus trap contains no elements in its tab order. With this option you can specify a fallback element to programmatically receive focus if no other tabbable elements are found. For example, you may want a popover's

to receive focus if the popover's content includes no tabbable elements. Make sure the fallback element has a negative tabindex so it can be programmatically focused. The option value can be a DOM node, a selector string (which will be passed to document.querySelector() to find the DOM node), or a function that returns any of these.

@skjnldsv skjnldsv added bug Something isn't working 3. to review Waiting for reviews feature: modal Related to the modal component labels Jun 25, 2023
@skjnldsv skjnldsv requested review from susnux, raimund-schluessler and a team June 25, 2023 10:46
@skjnldsv skjnldsv self-assigned this Jun 25, 2023
@skjnldsv skjnldsv requested review from artonge and Fenn-CS and removed request for a team June 25, 2023 10:46
@skjnldsv
Copy link
Contributor Author

/backport to stable7

@susnux
Copy link
Contributor

susnux commented Jun 25, 2023

@skjnldsv something is wrong with the package lock: 20,786 additions, 2 deletions
Are you using the correct node version? As the lockfile version is also downgraded from 3 to 2 with this update.

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@skjnldsv
Copy link
Contributor Author

@skjnldsv something is wrong with the package lock: 20,786 additions, 2 deletions Are you using the correct node version? As the lockfile version is also downgraded from 3 to 2 with this update.

Nice catch, haven't updated node on this terminal since the LTS merge

@skjnldsv skjnldsv requested a review from susnux June 25, 2023 13:33
@skjnldsv
Copy link
Contributor Author

Preview looks good, and content still focusable 👍

@skjnldsv skjnldsv requested a review from szaimen June 25, 2023 14:18
@skjnldsv skjnldsv merged commit 90076eb into master Jun 26, 2023
17 checks passed
@skjnldsv skjnldsv deleted the fix/focus-trap-Modal branch June 26, 2023 09:15
@backportbot-nextcloud
Copy link

The backport to stable7 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable7
git pull origin stable7

# Create the new backport branch
git checkout -b fix/foo-stable7

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable7

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@skjnldsv
Copy link
Contributor Author

#4270

@skjnldsv skjnldsv mentioned this pull request Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working feature: modal Related to the modal component
Projects
None yet
3 participants