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

Can't enter space in xeditable in AngularJS 1.7.3 #739

Closed
sherlock1982 opened this issue Sep 6, 2018 · 4 comments
Closed

Can't enter space in xeditable in AngularJS 1.7.3 #739

sherlock1982 opened this issue Sep 6, 2018 · 4 comments

Comments

@sherlock1982
Copy link

Switching from AngularJS 1.7.2 to 1.7.3 breaks ability to enter spaces in input fields.
I have a feeling this is due to this change angular/angular.js@3a517c2

sherlock1982 referenced this issue in angular/angular.js Sep 6, 2018
By default, pressing spacebar causes the browser to scroll down.
However, when a native button is focused, the button is clicked instead.

`ngAria`'s `ngClick` directive, sets elements up to behave like buttons.
For example, it adds `role="button"` and forwards `ENTER` and `SPACEBAR`
keypresses to the `click` handler (to emulate the behavior of native
buttons).

Yet, pressing spacebar on such an element, still invokes the default
browser behavior of scrolling down.

This commit fixes this, by calling `preventDefault()` on the keyboard
event, thus preventing the default scrolling behavior and making custom
buttons behave closer to native ones.

Closes #14665

Closes #16604
@sherlock1982
Copy link
Author

sherlock1982 commented Sep 6, 2018

Workaround: downgrade angular-aria to 1.7.2

@gkalpak
Copy link

gkalpak commented Sep 6, 2018

The regression should have been fixed with angular/angular.js#16680. It is not released yet (will happen in the next few days - possibly tomorrow). In the meantime, you can try out the latest version from https://code.angularjs.org/snapshot/ and see if the error goes away 🙏

@ckosloski
Copy link
Contributor

Should this be closed now that the issue has been merged?

@gkalpak
Copy link

gkalpak commented Sep 14, 2018

For future reference, the fix is included in v1.7.4. @sherlock1982, can you confirm that upgrading to v1.7.4 fixes the issue?

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

3 participants