Skip to content

Commit

Permalink
fix: forms element not focus when using Click Element block
Browse files Browse the repository at this point in the history
  • Loading branch information
Kholid060 committed Jan 27, 2023
1 parent f9c747e commit b83841f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/blocksHandler/handlerEventClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function eventClick(block) {
return;
}

simulateClickElement(element, () => element.click());
simulateClickElement(element);
},
onError(error) {
reject(error);
Expand Down
2 changes: 2 additions & 0 deletions src/content/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export function simulateClickElement(element) {
} else {
element.dispatchEvent(new PointerEvent('click', { bubbles: true }));
}

element.focus?.();
}

export function generateLoopSelectors(
Expand Down

0 comments on commit b83841f

Please sign in to comment.