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

Bubble Option not triggering change on the native select #364

Open
janwidmer opened this issue Jan 8, 2019 · 1 comment
Open

Bubble Option not triggering change on the native select #364

janwidmer opened this issue Jan 8, 2019 · 1 comment
Labels

Comments

@janwidmer
Copy link

janwidmer commented Jan 8, 2019

Version of Dropkick: 2.2.4

Expected Behaviour

Setting the option bubble to true triggers a change event on the native select. (Is that actually the exptected behaviour? Based on this Bugticket #303 and the docs (http://dropkickjs.com/docs/#bubble) thats how I understood it..)

Actual Behaviour

The native select does not receive a change event. I am using Dropkick in combination with the validation library parsleyjs. Because the native select does not receive the change event, the validation message does not go away.

Steps To Reproduce:

  1. Open below codepen
  2. Click submit Button which triggers the validation on the dropdown
  3. Choose an option from the dropdown
  4. The validation message should disappear
  5. Because of no change event on the native select, the validation message stays ()
  6. (Correct behaviour can be seen by turning of the init of dropkick)

JSBin / Example repo / Failing test:

Codepen to see the behaviour: https://codepen.io/janwidmer/pen/NezQdE

@janwidmer
Copy link
Author

janwidmer commented Jan 8, 2019

The "problem" is probably the combination of both plugins. Setting the data attribute data-parsley-trigger-after-failure="change" on the select makes it work correctly, which is kinda ironic since the native select does not seem to get a change event according to the codepen.. The default value of that data attribute is input which should according to mdn also include the change event..

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

No branches or pull requests

1 participant