mirror of
https://github.com/CloakHQ/CloakBrowser.git
synced 2026-06-23 11:41:46 +02:00
@@ -612,7 +612,7 @@ function patchSingleElementHandle(
|
||||
// --- Helper: get box and move cursor. Accepts a per-call ``callCfg``
|
||||
// so type/fill overrides like ``el.type(text, { human_config: {...} })``
|
||||
// carry through to mouse timing for that single call. Also scrolls into
|
||||
// view first so off-screen elements work (#129, #137 follow-up).
|
||||
// view first so off-screen elements work (#129, #172 follow-up).
|
||||
const moveToElement = async (callCfg: HumanConfig = cfg) => {
|
||||
await (page as any)._ensureCursorInit();
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ export async function humanScrollIntoView(
|
||||
*
|
||||
* ``timeout`` controls how long we poll ``page.$(selector)`` before giving up,
|
||||
* so callers like ``page.click('#x', { timeout: 5000 })`` can wait longer for
|
||||
* slow-loading elements (#137). Default stays 2000ms when not specified.
|
||||
* slow-loading elements (#172). Default stays 2000ms when not specified.
|
||||
*/
|
||||
export async function scrollToElement(
|
||||
page: Page,
|
||||
|
||||
@@ -136,7 +136,7 @@ export function patchSingleElementHandle(
|
||||
// ``el.type(text, { human_config: { typing_delay: 30 } })`` carry through to
|
||||
// mouse movement & idle timing for that single call.
|
||||
// Also scrolls the element into view first so off-screen elements work
|
||||
// (#129, #137 follow-up): otherwise boundingBox() returns null and we'd
|
||||
// (#129, #172 follow-up): otherwise boundingBox() returns null and we'd
|
||||
// silently fall back to the unpatched native method.
|
||||
const moveToElement = async (callCfg: HumanConfig = cfg) => {
|
||||
// Ensure cursor is initialized
|
||||
|
||||
@@ -151,7 +151,7 @@ export async function humanScrollIntoView(
|
||||
*
|
||||
* ``timeout`` is forwarded to Playwright's ``boundingBox({ timeout })`` so
|
||||
* callers like ``page.click('#x', { timeout: 5000 })`` can wait longer for
|
||||
* slow-loading elements (#137). Default stays 2000ms when not specified.
|
||||
* slow-loading elements (#172). Default stays 2000ms when not specified.
|
||||
*/
|
||||
export async function scrollToElement(
|
||||
page: Page,
|
||||
|
||||
Reference in New Issue
Block a user