fix: add browser step iff getText true
This commit is contained in:
@@ -111,6 +111,7 @@ export const BrowserWindow = () => {
|
|||||||
clickY >= highlightRect.top &&
|
clickY >= highlightRect.top &&
|
||||||
clickY <= highlightRect.bottom
|
clickY <= highlightRect.bottom
|
||||||
) {
|
) {
|
||||||
|
if (getText === true) {
|
||||||
const options = getAttributeOptions(highlighterData.elementInfo?.tagName || '');
|
const options = getAttributeOptions(highlighterData.elementInfo?.tagName || '');
|
||||||
if (options.length > 1) {
|
if (options.length > 1) {
|
||||||
setAttributeOptions(options);
|
setAttributeOptions(options);
|
||||||
@@ -127,6 +128,7 @@ export const BrowserWindow = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -144,11 +146,15 @@ export const BrowserWindow = () => {
|
|||||||
data = selectedElement.info?.innerText || '';
|
data = selectedElement.info?.innerText || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
addBrowserStep('', data, {
|
{
|
||||||
selector: selectedElement.selector,
|
if (getText === true) {
|
||||||
tag: selectedElement.info?.tagName,
|
addBrowserStep('', data, {
|
||||||
attribute: attribute
|
selector: selectedElement.selector,
|
||||||
});
|
tag: selectedElement.info?.tagName,
|
||||||
|
attribute: attribute
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setShowAttributeModal(false);
|
setShowAttributeModal(false);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user