mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00

Old Confluence does not aware of conflated model keypress event (see UI Events spec, https://w3c.github.io/uievents/#determine-keypress-keyCode). Additionally, Confluence can be hosted with any domains. Therefore, we cannot use blacklist to disable the conflated model keypress event only on it. This patch checks whether current or parent document is Confluence with JS module, called KeyPressEventModelCheckerChild. For kicking this module, nsHTMLDocument dispatches an custom event, CheckKeyPressEventModel, when it becomes editable only first time. Finally, if it's a Confluence instance, the module let PresShell know that we need to use split model keypress event in it. Differential Revision: https://phabricator.services.mozilla.com/D17907 --HG-- extra : moz-landing-system : lando