onFocus and onBlur not called
See original GitHub issueNOTE: The issue was encountered in 1.0.0-beta5
When the <Select/>
component is not searchable
, neither onFocus
nor onBlur
are called when interacting with the component. I don’t think it is the expected behaviour.
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
onblur event is not firing - javascript - Stack Overflow
To have Onblur on an element it should receive focus first, Div elements don't receive focus by default. You can add tabindex="0"
Read more >My onblur and onfocus function is not working in javascript
Solution 1. Okay I check your problem, If you want to show onblur function and onfocus function then you have call proper ElementsTageName....
Read more >Onfocus / onblur not working with RadzenDatePicker
In my application, I have created a control for receiving Scanner input, it pulls focus every 3 seconds. Outside of the control, when...
Read more >React 17 internally uses the browser's focusin and focusout ...
In React, the onFocus event is called when the element receives focus and onBlur event is called when focus has left the element....
Read more >calling this.blur() in onfocus handler or this.focus() in an onblur ...
The remaining problem that I noted (onblur=this.focus()) is probably caused by us not detecting that the blur handler did something. In the patch...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@IgorKirey Sometimes a repo maintainer could be busy with their own work and life. I know there might be a lot of issues that do not have a response (and I understand the frustration), but what we can do as a community is to try our best to provide support + try our best to give a hand in projects we care about. That’s the power of Open Source right? 😃
Issue related info Have been encountering the same issue but only on IE Edge.
Browser:
IE Edge (IE13)
OS:Windows 10
react-select version:beta-13
The
onBlur
event is working on Chrome and Safari, but not on Edge.I’m unsure what the root cause is, whether it is a React 15 problem or whether it’s a react-select issue.
Any help would be appreciated!
This works just fine:
Simply use the capturing phase on a parent element. You handle the event on its “way down” before it even reaches ReactSelect.