openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.36k stars 1.21k forks source link

Shift + right-click menu not appearing on Firefox/macOS #5742

Open quincylvania opened 5 years ago

quincylvania commented 5 years ago

Firefox 64.0.2 (64-bit)

Holding shift + right-clicking on a selected feature should bring up the contextual menu. In Firefox, the event must not be properly overriden since the default browser right-click menu it shown instead.

screen shot 2019-01-21 at 12 28 55 pm
1ec5 commented 5 years ago

Do you mean Ctrl+right-click on macOS?

/ref https://github.com/mapbox/mapbox-gl-js/issues/3131#issuecomment-267735892

quincylvania commented 5 years ago

Do you mean Ctrl+right-click on macOS?

Nope, it's definitely shift+right-click. Looks like Firefox has its own ideas about such things.

1ec5 commented 5 years ago

I can’t reproduce this issue. Shift+right-click doesn’t bring up the context menu in Safari or Chrome either, and Ctrl+right-click does bring up iD’s context menu for me in Firefox on the Mac. Are you using any extensions that might override the event handler?

quincylvania commented 5 years ago

@1ec5 Thanks for looking into this! I'm using a laptop trackpad, not sure if that makes a difference?

Typically control+right-click doesn't do anything special for me, it's the same as just right-clicking. In Safari and Chrome, shift+right-clicking on selected features brings up iD's context menu without deselecting them, allowing you to continue a specific line from a shared endpoint.

I tried it again in Firefox with no add-ons enabled. The behavior is the same.

quincylvania commented 5 years ago

In the months since posting this I've figured out what's going on here. I thought that shift+right-clicking itself mattered, but instead only what's selected matters. In Safari and Chrome, shift+right-click just adds the feature to the selection and then opens the context menu for both items. The user can do this in two steps in Firefox with the same result.

Closing this since there's an easy workaround and the v3 toolbar will diminish the need to open this menu with right-click anyway.

quincylvania commented 4 years ago

After #7992 showed difficulties with splitting specific lines, and since cross-browser parity is an ongoing goal, I'm reopening this. I'm not sure if there's an easy fix or not but we should at least look into it.