Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highlight text/element selection and visually response to selection API when double clicked #4570

Closed
futurist opened this issue Jun 11, 2019 · 4 comments

Comments

@futurist
Copy link

futurist commented Jun 11, 2019

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 1.17.0
  • Platform / OS version: macOS 10.14.4
  • URLs (if applicable): http://bennadel.github.io/JavaScript-Demos/demos/selection-range-rects/
  • Node.js version: 12.4.0

What steps will reproduce the problem?

Please include code that reproduces the issue.

// simulate dblclick on text
async function init () {
  const browser = await puppeteer.launch({
    headless: false,
    defaultViewport: null
  })
  const page = (await browser.pages())[0]
  await page.goto('http://bennadel.github.io/JavaScript-Demos/demos/selection-range-rects/')
  await page.mouse.move(573, 199)
  await page.waitFor(50)
  // simulate dblclick
  await page.mouse.down()
  await page.waitFor(50)
  await page.mouse.up()
  await page.waitFor(50)
  await page.mouse.down()
  await page.waitFor(50)
  await page.mouse.up()
  await page.waitFor(50)
}
init()

What is the expected result?
Should like normal browser, double click on text should highlight the word.

What happens instead?
No selection highlight happened on word, and the text selection is collapsed.

@futurist futurist changed the title highlight text/element selection and visually response to selection API highlight text/element selection and visually response to selection API when double clicked Jun 11, 2019
@futurist
Copy link
Author

I've monitored the page again, and find the above double click way actually only triggered 2 click events, no dblclick, is this intentional or a bug?

@Meir017
Copy link
Contributor

Meir017 commented Mar 15, 2020

@futurist this might be helpful - this is how they implement the dblclick https://github.com/microsoft/playwright/blob/v0.11.1/src/input.ts#L248

@stale
Copy link

stale bot commented Jun 26, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 26, 2022
@stale
Copy link

stale bot commented Jul 26, 2022

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!

@stale stale bot closed this as completed Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants