You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ion-range component accepts out of bounds values #17566
If I set the value on this range component to be -1, ionChange fires and the component's value is set to be -1.
Expected behavior:
I would expect this to behave similar to the native range component. If a value is out of range, set it to either the min or the max (whichever value is closer).
Steps to reproduce:
Related code:
<ion-range min="0" max="10" value="5" id="range"></ion-range>
<ion-button onclick="changeValue()">change value</ion-button>
<script>
let range = document.getElementById('range');
range.addEventListener('ionChange', (e) => {
console.log('change',e.detail);
});
function changeValue() {
range.value = -1;
}
</script>
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.
Activity
liamdebeasi commentedon Mar 1, 2019
Resolved by #17623
ionitron-bot commentedon Mar 31, 2019
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.