Open dadrc opened 5 years ago
I've investigated a bit and it seems to be linked to a Promise resolving too late:
You can reproduce it with any tab by putting a breakpoint in console.ts line 53 (return hideCommand()) The tab will then open in the background, and the current tab will keep focus.
Also if you return null in the enterCommand, the problem will go away (for a tab with pop ups allowed for example)
const enterCommand = async(
text: string,
): Promise<any>=> {
await browser.runtime.sendMessage({
type: messages.CONSOLE_ENTER_COMMAND,
text,
});
return null
};
Finally we see that the function onSelected from tabPresenter is called one more time when the "bug" occurs. I think that the Promise resolving late triggers a focus on the previous tab, skipping the new tab.
I have no idea why a tab with allowed popups would take longer to resolve that Promise though..
Thank you for your work on vim-vixen.
Operating system: Arch Linux
Firefox version: 69.0.1
Vim-Vixen version: 0.25
No output in the console is available.
I'm opening this issue because:
Description
When opening a new tab (using the t binding), Firefox switches to that tab. This feature does not work as expected if the website in the old tab has been granted the permission to open popup windows. The new tab is instead created in the background, the old tab remains active.
Steps to Reproduce
Actual result: The website will be opened in a new tab, but the tab will not be activated. Expected result: The website will be opened in a new tab and the new tab will be activated.
System configuration
Console logs
No output in the console is available.