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

Check for content editable? #2650

Closed
asajeffrey opened this issue Apr 21, 2020 · 2 comments
Closed

Check for content editable? #2650

asajeffrey opened this issue Apr 21, 2020 · 2 comments

Comments

@asajeffrey
Copy link

The code which checks to see if keyboard events should be discarded includes checking document.activeElement.contentEditable !== 'inherit' at

var activeElementIsCE = document.activeElement && document.activeElement.contentEditable !== 'inherit';

I'm confused about this check, as contentEditable can return "true", "false" or "inherit" (https://html.spec.whatwg.org/multipage/interaction.html#attr-contenteditable) so input is discarded when contentEditable is "false".

Perhaps the test should be document.activeElement.contentEditable === 'true' or document.activeElement.isContentEditable?

This came up in servo/servo#12776.

hakimel added a commit that referenced this issue Apr 22, 2020
@hakimel
Copy link
Owner

hakimel commented Apr 22, 2020

Thanks for reporting. Didn't know isContentEditable existed—I've switched to that in f138f50

The fix will be available when reveal.js 4.0 is released.

@hakimel hakimel closed this as completed Apr 22, 2020
@asajeffrey
Copy link
Author

Thanks!

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

2 participants