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

Checkbox changes state on ENTER key #819

Closed
maibaum007 opened this issue Jun 19, 2019 · 3 comments
Closed

Checkbox changes state on ENTER key #819

maibaum007 opened this issue Jun 19, 2019 · 3 comments
Labels
lang/javascript Anything involving JavaScript type/feat Any feature requests or improvements
Milestone

Comments

@maibaum007
Copy link

maibaum007 commented Jun 19, 2019

Current behavior: Checkboxes change their status, when they are focused and the ENTER-Key is pressed.

Expected behavior: They should only react to space key as native checkboxes do.

Problem: ENTER-Key is used to commit forms. Now, when you commit a form with ENTER-Key, the value of the checkbox changes unintentionally.

EDIT: Only happens, when checkbox gets initialized via Javascript

@lubber-de
Copy link
Member

Unfortunately i cannot reproduce this. See my testcase here
https://jsfiddle.net/7kqL485z/
When the checkbox gets clicked/focused , pressing RETURN does nothing as expected, but SPACE does.

Could you please adjust the jsfiddle to make the behavior reproducable, so we can investigate?
Thank you.

@lubber-de lubber-de added 📝 needs test case state/cannot-reproduce Bugs which can't be reproduced state/awaiting-response Issues or pull requests waiting for a response labels Jun 19, 2019
@lubber-de
Copy link
Member

lubber-de commented Jun 19, 2019

Nevermind, can reproduce now. It happens when checkbox gets initialized via Javascript.
Testcase https://jsfiddle.net/s4pmq7o1/

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug lang/javascript Anything involving JavaScript and removed 📝 needs test case state/cannot-reproduce Bugs which can't be reproduced state/awaiting-response Issues or pull requests waiting for a response labels Jun 19, 2019
@lubber-de lubber-de added type/feat Any feature requests or improvements and removed type/bug Any issue which is a bug or PR which fixes a bug labels Jun 19, 2019
@lubber-de
Copy link
Member

Adjustable via new setting enableEnterKey: false by #824
I labeled this issue as enhancement instead of a bug, because the functionality of being able to also use the ENTER key is implemented since a long time and therefore considered wanted behavior. Thus, the new setting of enabled by default to avoid a breaking change.
See https://jsfiddle.net/6o8pvfe4/

@lubber-de lubber-de added this to the 2.7.7 milestone Jun 19, 2019
@lubber-de lubber-de added the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jun 24, 2019
@y0hami y0hami closed this as completed in 5d16709 Jul 28, 2019
@lubber-de lubber-de removed the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript type/feat Any feature requests or improvements
Projects
None yet
Development

No branches or pull requests

2 participants