fix: capture text selection
This commit is contained in:
@@ -20,7 +20,7 @@ export const getElementInformation = async (
|
|||||||
getList: boolean
|
getList: boolean
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
if (listSelector !== '') {
|
if (!getList) {
|
||||||
const elementInfo = await page.evaluate(
|
const elementInfo = await page.evaluate(
|
||||||
async ({ x, y }) => {
|
async ({ x, y }) => {
|
||||||
const el = document.elementFromPoint(x, y) as HTMLElement;
|
const el = document.elementFromPoint(x, y) as HTMLElement;
|
||||||
@@ -158,7 +158,7 @@ export const getElementInformation = async (
|
|||||||
*/
|
*/
|
||||||
export const getRect = async (page: Page, coordinates: Coordinates, listSelector: string, getList: boolean) => {
|
export const getRect = async (page: Page, coordinates: Coordinates, listSelector: string, getList: boolean) => {
|
||||||
try {
|
try {
|
||||||
if (listSelector !== '') {
|
if (!getList) {
|
||||||
const rect = await page.evaluate(
|
const rect = await page.evaluate(
|
||||||
async ({ x, y }) => {
|
async ({ x, y }) => {
|
||||||
const el = document.elementFromPoint(x, y) as HTMLElement;
|
const el = document.elementFromPoint(x, y) as HTMLElement;
|
||||||
|
|||||||
Reference in New Issue
Block a user