$event.target is unavailable from the (ionBlur) event
See original GitHub issueIonic version: (check one with “x”) [ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [X] 3.x
I’m submitting a … (check one with “x”) [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: $event.target is undefined since i have changed the (blur) deprecated event by (ionBlur) event in my template Expected behavior: $event.target property should be available
Steps to reproduce:
Related code:
<ion-input (blur)="onBlur($event)"></ion-input>
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
$event.target is unavailable from the (ionBlur) event #12264
The event type change from blur to ionBlur for ion-input seems to have resulted in the $event value passed from the template changing...
Read more >ionBlur Event: Detect the element that is receiving the focus
When testing, the event parameter of the onBlur method contains the attributes target and currentTarget which both are the element that is ...
Read more >ionFocus or ionBlur not working in ios but working in browser
I m using ionic angular, I have added HostListener('ionFocus'), and it is working in the browser without any issue. But when I build...
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 >target Event Property - W3Schools
The target property gets the element on which the event originally occurred, opposed to the currentTarget property, which always refers to the element...
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 Free
Top 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
The event type change from
blur
toionBlur
forion-input
seems to have resulted in the$event
value passed from the template changing from the native event object to an IonicTextInput
.I still found a way to access the blur event target but it’s probably not the wisest approach.
Old way with
blur
:New way with
ionBlur
:In the
ionBlur
scenario, the_native
property is labeled with a@hidden
comment and it’s excluded from the docs, so it’s probably not considered part of the public API contract.Would appreciate guidance on a recommended way to access the blur event target! 😃
Thank you!
Thanks for using Ionic, we will look into this.