From 87eb6e01566d6fbdb82cb6457a86e63cb858375f Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Wed, 30 Oct 2019 23:52:32 +0100 Subject: [PATCH] Improve autosubmit via Chromium's debugger --- src/background.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/background.js b/src/background.js index 9df0fcb..45ebda1 100644 --- a/src/background.js +++ b/src/background.js @@ -327,14 +327,17 @@ async function dispatchFocusOrSubmit(settings, request, allFrames, allowForeign) for (let frame of perFrameResults) { if (frame.needPressEnter) { chrome.debugger.attach({ tabId: settings.tab.id }, "1.2"); - for (let type of ["keyDown", "keyUp"]) { + for (let type of ["keyDown", "char", "keyUp"]) { chrome.debugger.sendCommand( { tabId: settings.tab.id }, "Input.dispatchKeyEvent", { type: type, + key: "Enter", windowsVirtualKeyCode: 13, - nativeVirtualKeyCode: 13 + nativeVirtualKeyCode: 13, + unmodifiedText: "\r", + text: "\r" } ); }