Bug 1299453 - Stop using createEvent("DragEvents"/"KeyEvents") internally; r=smaug
They are non-standard aliases for "DragEvent" and "KeyboardEvent" that are not supported by any other UA, and we would like to drop support. So first let's stop using them ourselves, so we can use telemetry to see if any sites are using them. MozReview-Commit-ID: ICC33ORa2st
This commit is contained in:
@@ -46,7 +46,7 @@ function promiseFindResult(findbar, str = null) {
|
||||
function promiseEnterStringIntoFindField(findbar, str) {
|
||||
let promise = promiseFindResult(findbar, str);
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
let event = document.createEvent("KeyEvents");
|
||||
let event = document.createEvent("KeyboardEvent");
|
||||
event.initKeyEvent("keypress", true, true, null, false, false,
|
||||
false, false, 0, str.charCodeAt(i));
|
||||
findbar._findField.inputField.dispatchEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user