dosubot[bot] commented on issue #34157: URL: https://github.com/apache/superset/issues/34157#issuecomment-3069268527
<!-- Answer --> This is a valid bug caused by how the legend items are implemented in the DeckGL Scatter Map. The legend entries are rendered as anchor tags (`<a href="#">`) without calling `event.preventDefault()` in their `onClick` handler. As a result, when you Ctrl+Click (or Cmd+Click) a legend item, the browser opens a new tab, which is the default behavior for anchor tags with an `href` attribute when a modifier key is pressed. This happens regardless of browser or OS, so it's not specific to Edge or Debian [see code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx). There is no existing fix for this in recent Superset releases or PRs. As a workaround, avoid using Ctrl+Click on legend items. For a code fix, you (or your team) can update the `onClick` handler in `Legend.tsx` to accept the event argument and call `event.preventDefault()` before toggling the category. For example: ```tsx <a href="#" role="button" onClick={e => { e.preventDefault(); toggleCategory(k); }} ... > ``` This will prevent the browser from opening a new tab and ensure only the legend visibility toggles. If you’re not able to patch this locally, keep an eye on future Superset releases for a fix. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/d5304313-766f-40fb-8001-f76562ab8a89?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d5304313-766f-40fb-8001-f76562ab8a89?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d5304313-766f-40fb-8001-f76562ab8a89?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d5304313-766f-40fb-8001-f76562ab8a89?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d5304313-766f-40fb-8001-f76562ab8a89?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d5304313-766f-40fb-8001-f76562ab8a89?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d5304313-766f-40fb-8001-f76562ab8a89?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [! [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34157) -- 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]
