Open frykten opened 2 years ago
Hi :wave:
We were trying to use the Change Event on the PikadayInput Component et we were surprised to see the event triggered on data-down.
When debugging the issue, we can follow easily the stack trace down to these codes blocks: https://github.com/adopted-ember-addons/ember-pikaday/blob/9a3fae61ed33151b9c377a324fd711c19d61732a/src/modifiers/pikaday.js#L59 https://github.com/adopted-ember-addons/ember-pikaday/blob/9a3fae61ed33151b9c377a324fd711c19d61732a/vendor/pikaday.js#L832
As the W3C Specs point out, the Change Event is to be triggered only on user conscious input (leaving a non-validated input, checking a radio button, selecting/changing the date of a date input, etc...). https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event https://html.spec.whatwg.org/multipage/input.html#concept-input-apply
Is it a wrong use on your side of Pikaday's Api or rather on their implementation?
Hi :wave:
We were trying to use the Change Event on the PikadayInput Component et we were surprised to see the event triggered on data-down.
When debugging the issue, we can follow easily the stack trace down to these codes blocks: https://github.com/adopted-ember-addons/ember-pikaday/blob/9a3fae61ed33151b9c377a324fd711c19d61732a/src/modifiers/pikaday.js#L59 https://github.com/adopted-ember-addons/ember-pikaday/blob/9a3fae61ed33151b9c377a324fd711c19d61732a/vendor/pikaday.js#L832
As the W3C Specs point out, the Change Event is to be triggered only on user conscious input (leaving a non-validated input, checking a radio button, selecting/changing the date of a date input, etc...). https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event https://html.spec.whatwg.org/multipage/input.html#concept-input-apply
Is it a wrong use on your side of Pikaday's Api or rather on their implementation?