Skip to content

Bug Report:Javascript not working on Chrome v1.48.4.13 #886

Description

@runningcheese

Hi there,

I am using Firefox browser with ContextSearch version 1.48.4.13
The javascript function works well.
However, It doesn't work properly on Chrome with the same version.

Here is a sample.

  1. Create a normal engin.
  2. URL input: https://www.doubao.com/chat
  3. Script input:
    (async () => { await new Promise(r => setTimeout(r, 500)); let input = document.querySelector('textarea'); function simulateClick(element) { const mouseDownEvent = new MouseEvent('mousedown', { bubbles: true }); const mouseUpEvent = new MouseEvent('mouseup', { bubbles: true }); element.dispatchEvent(mouseDownEvent); element.dispatchEvent(mouseUpEvent); element.focus(); } function simulateFullInput(element, value) { element.focus(); document.execCommand('insertText', false, value); const inputEvent = new Event('input', { bubbles: true }); element.dispatchEvent(inputEvent); } simulateClick(input); simulateFullInput(input, searchTerms); await new Promise(r => setTimeout(r, 500)); const enterKeyEvent = new KeyboardEvent('keydown', { key: 'Enter', code: 'Enter', keyCode: 13, bubbles: true }); input.dispatchEvent(enterKeyEvent); const enterInputEvent = new Event('input', { bubbles: true }); input.dispatchEvent(enterInputEvent); })();

The script works well with firefox extension, but chrome doesn't.
The engin input nothing happen.

and, I have tried the older chrome versions.
Chrome Version 1.47.13 wroks well.
Chrome Version 1.48.4.13 doesn't

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions