Issue #2019 - Do not dispatch keypress event for non-printable keys.

This will prevent the keypress DOM event from firing on keypresses
that do not produce printable keys (e.g. editing nav keys) in content.
This should not affect any chrome events that are in use.
Event dispatch can be re-enabled if necessary with the added pref.
This commit is contained in:
Moonchild 2022-10-17 12:07:37 +00:00 • committed by roytam1
commit 1392f5f223
6 changed files with 48 additions and 15 deletions

View file

@ -231,6 +231,10 @@ pref("dom.keyboardevent.code.enabled", true);
// even if this is true).
pref("dom.keyboardevent.dispatch_during_composition", false);
// If this is true, TextEventDispatcher dispatches keypress events
// for the input of non-printable characters (content only).
pref("dom.keyboardevent.keypress.dispatch_non_printable_in_content", false);
// Whether URL,Location,Link::GetHash should be percent encoded
// in setter and percent decoded in getter (old behaviour = true)
pref("dom.url.encode_decode_hash", true);