-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ctrl+Shift+B swaps between the background #4153
Comments
I got some time to look into this bug. There are two d3keybinding namespaces involved,
{
"event": {
"key": "b",
"keyCode": 66,
"modifiers": {
"shiftKey": true,
"ctrlKey": false,
"altKey": false,
"metaKey": true
}
}
} and {
"event": {
"key": "b",
"keyCode": 66,
"modifiers": {
"shiftKey": false,
"ctrlKey": false,
"altKey": false,
"metaKey": true
}
}
}, I guess problem seems to lie here https://github.com/openstreetmap/iD/blob/master/modules/lib/d3.keybinding.js#L25 @bhousel what do you think? |
Yeah, it does seem like something not quite right in that code. I would expect |
@bhousel I might be wrong though, but having a separate |
|
I found out what was happening, the key event just gets sent to all of the listeners unless we specifically stop it. This is normal. I added some I'm a bit uneasy about this because it means that the code is probably order-dependent. So it works as long as ⌘⇧B and ⌘B are registered in the right order, otherwise the ⌘B could potentially override the ⌘⇧B. I'll think more about this but closing the issue for now.. |
As described here #2492 (comment)
The text was updated successfully, but these errors were encountered: