fix: add browser step iff getText true

This commit is contained in:
karishmas6
2024-08-06 02:16:53 +05:30
parent 959a498cf8
commit 864d4e1ad2

View File

@@ -111,6 +111,7 @@ export const BrowserWindow = () => {
clickY >= highlightRect.top &&
clickY <= highlightRect.bottom
) {
if (getText === true) {
const options = getAttributeOptions(highlighterData.elementInfo?.tagName || '');
if (options.length > 1) {
setAttributeOptions(options);
@@ -128,6 +129,7 @@ export const BrowserWindow = () => {
}
}
}
}
};
const handleAttributeSelection = (attribute: string) => {
@@ -144,12 +146,16 @@ export const BrowserWindow = () => {
data = selectedElement.info?.innerText || '';
}
{
if (getText === true) {
addBrowserStep('', data, {
selector: selectedElement.selector,
tag: selectedElement.info?.tagName,
attribute: attribute
});
}
}
}
setShowAttributeModal(false);
};