Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Data-down triggers native Change Event #537

Open
frykten opened this issue Jun 8, 2022 · 0 comments
Open

[Bug] Data-down triggers native Change Event #537

frykten opened this issue Jun 8, 2022 · 0 comments

Comments

@frykten
Copy link

frykten commented Jun 8, 2022

Hi 👋

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:

this.#pikaday.setDate(value, !valueAltered);

fireEvent(this._o.field, 'change', { firedBy: this });

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant