sadpandajoe opened a new issue, #44923:
URL: https://github.com/apache/superset/issues/44923
### Bug description
The "Open in SQL Lab" button in the View query modal footer only treats
`metaKey` as "open in new window". On Windows/Linux, where Ctrl is the modifier
users expect, Ctrl+click navigates within the app. The sibling `ViewQuery`
component already treats `metaKey || ctrlKey` as equivalent.
Steps to reproduce: Explore -> chart menu -> View query -> hold Ctrl and
click "Open in SQL Lab". It navigates the current tab to SQL Lab instead of
posting to a new window. (Cmd+click works on macOS.)
Expected: Ctrl+click behaves like Cmd+click.
### Where
`superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx`
L90: `onClick={({ metaKey }) => openSQL(Boolean(metaKey))}`
`superset-frontend/src/explore/components/controls/ViewQuery.tsx` L141: `if
(domEvent.metaKey || domEvent.ctrlKey) {`
### Suggested fix
`onClick={({ metaKey, ctrlKey }) => openSQL(Boolean(metaKey || ctrlKey))}`
### Found by
Found while adding React Testing Library coverage for Explore controls (all
line numbers are against `master` at `bc3698b5d6`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]