question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to stop propagation on SelectPrimitive.Item?

See original GitHub issue

Question

Hi, I want to stop propagation click event on SelectPrimitive.Item. I already checked that current SelectPrimitive.Item use onPointerUp() event to handle select event. I tried like below, but it is not working correctly. Please let me know how to stop propagation or fixed it if it is a bug.

<SelectPrimitive.Item
    onPointerUp={(event) => {
        console.log('onPointerUp');
        event.stopPropagation();
    }}
    onClick={(event) => {
        console.log('onClick');
        event.stopPropagation();
    }}>
    ....
</SelectPrimitive.Item>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
benoitgrelardcommented, Oct 10, 2022

Ah I see, in which case I will close this as a duplicate of #1658 🙂

0reactions
inje-hottestlabcommented, Oct 10, 2022

@benoitgrelard I just created test-case in CodeSandbox, but I cannot reproduce the bug on it. https://codesandbox.io/s/flamboyant-pateu-3ckit0?file=/src/App.tsx&resolutionWidth=320&resolutionHeight=675

I found that the bug is only occurred on Chrome mobile dimension mode. Please refer to attached video.

https://user-images.githubusercontent.com/77093262/194849439-2c8cf0d8-4808-4f78-912c-42a49c68f5ee.mov

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stop propagation from select component in React
When the user now tries to select an element from dropdown, the event is propagated to button as well. How can I prevent...
Read more >
6 - Event Handling & stopPropagation & preventDefault (React ...
In this video, we talked about how to handle onclick,onchange,onsubmit,onblur events in React and when to use stopPropagation and ...
Read more >
ug906-vivado-design-analysis.pdf - Xilinx
To that end, we're removing non- inclusive language from our products and related collateral. We've launched an internal initiative to remove ...
Read more >
How to stop propagation on SelectPrimitive.Item? - PullAnswer
Hi, I want to stop propagation click event on SelectPrimitive.Item . I already checked that current ... Item use onPointerUp() event to handle...
Read more >
Maintaining LVOOP type in a non-dynamic dispatch VI of ...
Is there no way to allow the REAL object type to propagate on the wire in such a scheme so that I can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found