[Select] onBlur event target
See original GitHub issueThere is some mismatch with [Select] events.
<Select
onChange={console.log}
onBlur={console.log}
>
{options}
</Select>
In this case, both events are fired, but onChange has event.target
set to [Input] with appropriate attributes, but onBlur has event.target
set to [Select]. Even when onBlur is set directly to [Input], event.target
is still [Select].
Problem is that this makes onBlur event useless when you need handle input value onBlur in stateless components. You can’t read input value or any of attributes.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
When a 'blur' event occurs, how can I find out which element ...
2015 answer: according to UI Events, you can use the relatedTarget property of the event: Used to identify a secondary EventTarget related to...
Read more >Element: blur event - Web APIs | MDN
The blur event fires when an element has lost focus. The event does not bubble, but the related focusout event that follows does...
Read more >onblur Event - W3Schools
The onblur event occurs when an element loses focus. The onblur event is often used on input fields. The onblur event is often...
Read more >[Select] onBlur event target #12204 - mui/material-ui - GitHub
In this case, both events are fired, but onChange has event.target set to [Input] with appropriate attributes, but onBlur has event.target ...
Read more >.blur() | jQuery API Documentation
An object containing data that will be passed to the event handler. ... A function to execute each time the event is triggered....
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
np I can submit a fix tonight
@hassan-zaheer It would be great, since I’m unavailable to work on this issue right now. And I guess that no one else is working on this.