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

The ion-range web component doesn't fire the ionChange event when using the keyboard #14090

Closed richardruiter closed 5 years ago

richardruiter commented 6 years ago

Ionic version: (check one with "x") (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [ ] 3.x [x] 4.x

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request

Current behavior:

When you focus a ion-range component using the tab key and then hit the right arrow key ionChange is not fired.

Expected behavior: The ionChange event should be fired when using the keyboard as well.

Steps to reproduce:

Focus the input field. Then press tab and use the arrow keys. The input is not updated.

Related code:

    <input type="number" id="demo-input"></input>
    <ion-range id="demo" min="0" max="100" value="0"></ion-range>
    <script>
        (function () {
            var slider = document.querySelector('#demo');
            var input = document.querySelector('#demo-input');
            slider.addEventListener('ionChange', function (e) { input.value = e.detail.value; });
            input.addEventListener('input', function (e) { slider.setAttribute('value', e.target.value); });
        }());
    </script>
paulstelzer commented 5 years ago

Is this issue still exist in beta.17?

manucorporat commented 5 years ago

Duplicated of https://github.com/ionic-team/ionic/issues/13978

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.