Skip to content

fix(useHotKey): do not prevent hotkeys on hidden modal/dialog#7966

Merged
skjnldsv merged 1 commit intomainfrom
fix/event-ignore
Dec 10, 2025
Merged

fix(useHotKey): do not prevent hotkeys on hidden modal/dialog#7966
skjnldsv merged 1 commit intomainfrom
fix/event-ignore

Conversation

@skjnldsv
Copy link
Contributor

@skjnldsv skjnldsv commented Dec 9, 2025

Found working on Server upgrade. If the viewer is idling waiting to be shown, the element is still present in the dom.
We need to ensure it's also really shown.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • πŸ“˜ Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

@skjnldsv skjnldsv added this to the 9.3.1 milestone Dec 9, 2025
@skjnldsv skjnldsv self-assigned this Dec 9, 2025
@skjnldsv skjnldsv added bug Something isn't working 3. to review Waiting for reviews labels Dec 9, 2025
@skjnldsv
Copy link
Contributor Author

skjnldsv commented Dec 9, 2025

I was a bit too quick, let me adjust the test

@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Dec 9, 2025
@skjnldsv skjnldsv requested a review from ShGKme December 9, 2025 17:16
@skjnldsv skjnldsv added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 9, 2025
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 53.01%. Comparing base (e5737a2) to head (fb0e3d6).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7966      +/-   ##
==========================================
+ Coverage   52.99%   53.01%   +0.01%     
==========================================
  Files         100      100              
  Lines        3119     3120       +1     
  Branches      867      868       +1     
==========================================
+ Hits         1653     1654       +1     
  Misses       1228     1228              
  Partials      238      238              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@skjnldsv
Copy link
Contributor Author

skjnldsv commented Dec 9, 2025

/backport to stable8

Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for a hotfix, but I'd propose to remove allowInModal in favour of hotkey scoping similar to the focus trap.

So that:

  • It doesn't depend on a CSS class in the modal
  • It supports not only NcModal but other modal popovers as well like NcPopover
  • It supports nesting, for example, when a file picker dialog is open from the settings dialog, and each has its own hotkeys

@skjnldsv
Copy link
Contributor Author

skjnldsv commented Dec 9, 2025

Fine for a hotfix, but I'd propose to remove allowInModal in favour of hotkey scoping similar to the focus trap.

Referenced in new ticket πŸ‘

@skjnldsv skjnldsv enabled auto-merge December 9, 2025 17:27
@skjnldsv skjnldsv requested a review from Antreesy December 9, 2025 17:37
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise works fine, smoke tested in the app

@skjnldsv skjnldsv merged commit e193488 into main Dec 10, 2025
27 checks passed
@skjnldsv skjnldsv deleted the fix/event-ignore branch December 10, 2025 09:35
@backportbot
Copy link

backportbot bot commented Dec 10, 2025

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

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

# Create the new backport branch
git checkout -b backport/7966/stable8

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick fb0e3d68

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/7966/stable8

Error: Failed to check for changes with origin/stable8: No changes found in backport branch


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

@skjnldsv
Copy link
Contributor Author

/backport fb0e3d6 to stable8

@backportbot
Copy link

backportbot bot commented Dec 10, 2025

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

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

# Create the new backport branch
git checkout -b backport/7966/stable8

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick fb0e3d6

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/7966/stable8

Error: Failed to check for changes with origin/stable8: No changes found in backport branch


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

@ShGKme ShGKme changed the title fix: do not prevent hotkeys on hidden modal/dialog fix(useHotKey): do not prevent hotkeys on hidden modal/dialog Dec 10, 2025
@skjnldsv skjnldsv mentioned this pull request Dec 10, 2025
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 backport-request bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants