-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Shortcuts also work in rich text editors #7156
Comments
We do something similar at https://github.com/mozilla/pdf.js/blob/master/web/viewer.js#L2016 -- extend it to recognize other custom elements. |
Add |
Or the quickest workaround would be to have the element contenteditable key listener call event.stopPropagation() |
Adding the marked line below in pdf.js fixed the issue with textAngular key events. Thanks Rob. ...
var curElementTagName = curElement && curElement.tagName.toUpperCase(); |
Rather than leaving this open indefinitely, I'd suggest doing one of two things here:
|
hi, I want to work on my very first bug... |
Sure, please do. |
Configuration:
Steps to reproduce the problem:
What is the expected behavior?
The pressed key should be only inserted in to the RTE.
What went wrong?
The shortcut will be also performed in pdf.js (rotating page while pressing 'r' ...).
So far this is the correct behaviour. But there is already code for exeptions starting in line 7823 in viewer.js. I.e. for input, textarea and select fields. But this won't work with div based rich text editors.
Would it make sense to check also "Element.attributes.contenteditable" so that the shortcuts won't get handled if the focus is in an editable element?
The text was updated successfully, but these errors were encountered: