Browse Source

fix(web): can't input enter in form debug mode (#1317)

Ahmad Kholid 2 years ago
parent
commit
91d8de1e9f
3 changed files with 3 additions and 2 deletions
  1. 1 1
      package.json
  2. 1 0
      src/background/index.js
  3. 1 1
      src/content/blocksHandler/handlerForms.js

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "automa",
-  "version": "1.28.5",
+  "version": "1.28.4",
   "description": "An extension for automating your browser by connecting blocks",
   "repository": {
     "type": "git",

+ 1 - 0
src/background/index.js

@@ -88,6 +88,7 @@ message.on('debugger:type', ({ tabId, commands, delay }) => {
         resolve();
         return;
       }
+      console.log(command);
 
       chrome.debugger.sendCommand(
         { tabId },

+ 1 - 1
src/content/blocksHandler/handlerForms.js

@@ -25,8 +25,8 @@ async function forms(block) {
   async function typeText(element) {
     if (block.debugMode && data.type === 'text-field') {
       const commands = data.value.split('').map((char) => ({
-        text: char,
         type: 'keyDown',
+        text: char === '\n' ? '\r' : char,
       }));
       const typeDelay = +block.data.delay;
       await sendMessage(