Skip to content

Conversation

@manzt
Copy link
Contributor

@manzt manzt commented Dec 22, 2025

Fixes #7547

The desired behavior of the create cell button is to default to adding a Python cell on click, with Ctrl+Click (Cmd+Click on Mac) opening a dropdown to select other cell types. This worked on Mac but not on Windows/Linux because Radix's DropdownMenuTrigger ignores Ctrl+Click (likely because browsers historically use Ctrl+Click for "open link in new tab" and Radix avoids interfering with that).

The fix bypasses Radix's trigger behavior entirely. We intercept pointer events in the capture phase before Radix sees them, stop propagation, and manage the dropdown's open state ourselves. Open to other ideas if folks have it. I've implemented the fix on my windows machine.

@manzt manzt requested a review from Light2Dark as a code owner December 22, 2025 04:04
@vercel
Copy link

vercel bot commented Dec 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Ready Preview, Comment Dec 26, 2025 4:15pm
@manzt manzt added the bug Something isn't working label Dec 22, 2025
Fixes #7547

The desired behavior of the create cell button is to default to adding a
Python cell on click, with `Ctrl+Click` (`Cmd+Click` on Mac) opening a
dropdown to select other cell types. This worked on Mac but not on
Windows/Linux because Radix's `DropdownMenuTrigger` ignores `Ctrl+Click`
(likely because browsers historically use `Ctrl+Click` for "open link in
new tab" and Radix avoids interfering with that).

The fix bypasses Radix's trigger behavior entirely. We intercept pointer
events in the capture phase before Radix sees them, stop propagation,
and manage the dropdown's open state ourselves. Open to other ideas if
folks have it. I've implemented the fix on my windows machine.
mscolnick
mscolnick previously approved these changes Dec 23, 2025
## 📝 Summary

<!--
Provide a concise summary of what this pull request is addressing.

If this PR fixes any issues, list them here by number (e.g., Fixes
#123).
-->

## 🔍 Description of Changes

<!--
Detail the specific changes made in this pull request. Explain the
problem addressed and how it was resolved. If applicable, provide before
and after comparisons, screenshots, or any relevant details to help
reviewers understand the changes easily.
-->

## 📋 Checklist

- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [ ] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [ ] I have added tests for the changes made.
- [x] I have run the code and verified that it works as expected.
@manzt manzt added the bash-focus Area to focus on during release bug bash label Dec 26, 2025
@manzt manzt requested a review from akshayka December 26, 2025 16:16
@akshayka akshayka merged commit 45e64f2 into main Dec 26, 2025
25 of 26 checks passed
@akshayka akshayka deleted the push-stvrouulnoko branch December 26, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash bug Something isn't working

5 participants