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

'Toggle history panel' keyboard shortcut overrides browser shortcuts on macOS #10479

Open
1 task
gy-mate opened this issue Sep 28, 2024 · 4 comments
Open
1 task

Comments

@gy-mate
Copy link

gy-mate commented Sep 28, 2024

URL

https://www.openstreetmap.org/edit

How to reproduce the issue?

  1. Open the URL
  2. Click somewhere on the map
  3. Press ⌘⇧H
  4. The iD History panel opens instead of...
    • the home page of the browser (Safari 18.0, Google Chrome 129.0.6668.71, Microsoft Edge 129.0.2792.65)
    • the History sidebar of the browser (Firefox 130.0.1)
Screen.Recording.2024-09-29.at.14.24.29_lowbitrate.mp4

Screenshot(s) or anything else?

The issue is present on macOS 15.0 using the browsers above. I haven't tested Opera and Vivaldi.

I think this is the relevant line in the code:

.keys([uiCmd('⌘⇧' + t('info_panels.history.key'))])

Maybe it could be solved by requiring an additional press on the ⌥ key:

        var historyPanelLabelEnter = panelsListEnter
            .append('li')
            .attr('class', 'history-panel-toggle-item')
            .append('label')
            .call(uiTooltip()
                .title(() => t.append('map_data.history_panel.tooltip'))
-                .keys([uiCmd('⌘⇧' + t('info_panels.history.key'))])
+                .keys([uiCmd('⌘⌥⇧' + t('info_panels.history.key'))])
                .placement('top')
            );

To do after the issue is closed as completed

Which deployed environments do you see the issue in?

Released version at openstreetmap.org/edit, Development version at ideditor.netlify.app, RapiD version at mapwith.ai/rapid

What version numbers does this issue effect?

2.30.2

Which browsers are you seeing this problem on?

Chrome, Firefox, Microsoft Edge, Safari

@1ec5
Copy link
Collaborator

1ec5 commented Sep 29, 2024

I’m unable to reproduce this issue in Firefox 131 on macoS 14.7. However, I often find that the built-in shortcuts involving the command key trigger browser functions when the keyboard focus is either inside a text field or somewhere outside of iD. Do you know if this could’ve been the case for you when you encountered this issue?

@gy-mate
Copy link
Author

gy-mate commented Sep 29, 2024

I often find that the built-in shortcuts involving the command key trigger browser functions when the keyboard focus is either inside a text field or somewhere outside of iD. Do you know if this could’ve been the case for you when you encountered this issue?

@1ec5 The issue is that iD functions are triggered instead of browser functions, so I think this isn't the case.

I've updated the issue description with more version numbers and a screen recording.

@1ec5
Copy link
Collaborator

1ec5 commented Sep 29, 2024

Ah, I see what you mean. Almost any key combo involving Command is going to conflict with a browser or OS function, though adding Option makes it less likely. For some things like searching and saving, this is intentional, but for the History panel it can be surprising. Another example is command-B for switching backgrounds versus (in Firefox) toggling the Bookmarks sidebar.

If we add Option to the key combo, then we can remove the Shift key to preserve the ergonomics. We’d need to keep Command in there, because Option alone would conflict with some popular keyboard layouts.

@gy-mate
Copy link
Author

gy-mate commented Sep 29, 2024

Good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants