fix: ensure correct active tab detection from the extension dashboard
When trying to detect the "active tab" from the Automa extension's dashboard (like when triggering a CSS selector), the dashboard window is always focused. This caused the original code to fail in correctly identifying the active tab and throw error.
Now, using the windows.getLastFocused() API to query "normal" type window, we can accurately fetch the active tab without extension's panel window.
That's fix both of "Element Selector" and "Record Workflow" / "Record from here" functions.
fix: ensure correct active tab detection from the extension dashboard
When trying to detect the "active tab" from the Automa extension's dashboard (like when triggering a CSS selector), the dashboard window is always focused. This caused the original code to fail in correctly identifying the active tab and throw error.
Now, using the
windows.getLastFocused()
API to query "normal
" type window, we can accurately fetch the active tab without extension's panel window.That's fix both of "Element Selector" and "Record Workflow" / "Record from here" functions.
Issue example screenshot: