ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.93k stars 13.52k forks source link

bug: ion-range ionBlur does not fire after change #18818

Closed danielehrhardt closed 5 years ago

danielehrhardt commented 5 years ago

Bug Report

Ionic version: [x] 4.6.2

Current behavior:

If you add a normal ion-range Component with the (ionBlur)="log()" Function. The log Function only gets called, if you drag and then click somewhere else.

Expected behavior:

When you move the Slider and then leave the Knob it should call the Function directly.

Steps to reproduce:

ionic start add <ion-range [(ngModel)]="distance" (ionBlur)="log()"></ion-range> to the html and move the slider.

liamdebeasi commented 5 years ago

Thanks for the issue! The ionBlur event is supposed to fire when the ion-range element loses focus. When dragging ion-range and then releasing your mouse, the element is still focussed until you click outside of it. (there is a bug where this does not always happen which we are aware of)

We understand that this is not what some people would expect, so we are interested in doing something similar to https://github.com/ionic-team/ionic/issues/17839. This would allow users to detect changes in the value of ion-range.

I am going to close this issue in favor of the one I linked to. Feel free to continue the discussion in that thread. Thanks!

ionitron-bot[bot] commented 5 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.