firefox + chrome extension: bring new window on top (foreground) - windows 10

Viewed 141

I want to do the following, on user interaction/event (user copies a word), the extension opens a new window and sends to a specific URL (containing that word). This window opens focused by default. This works fine as long as the user copies the word from a web page, the new window is visible and on top of the current browser window.

The problem is, when someone is copying a word from a text editor: The window opens (default focused) but doesn't come in the foreground (i.e. above the current window in which the text was copied). I want the new created window to come on top of whatever application the user copied the word from.

By searching the mozilla developer forums, there seems to be an alwaysOnTop property which is false. Trying to set that value to true, during the window creation triggers an error. Setting it to true after the creation does nothing.

Is there a way to achieve this? Thank you in advance.

UPDATE: it seems to not work only in Windows 10. It works alright (window automatically in foreground) in Windows 7

0 Answers
Related