I've tried jquery window.open, but all focus will be shifted to new tab, and i dont want that, onclick should open new tab without shifting focus from current tab, also tried window.blur()
and window.focus()
, but doesn't fit my requirement.
onlick should open a new tab but the focus should be on current tab and not on the new tab and should work on chrome and mozzila
Asked
Active
Viewed 1,634 times
1

preetham
- 13
- 4
-
Possible dubplicate: https://stackoverflow.com/questions/6213807/open-a-new-tab-with-javascript-but-stay-on-current-tab – vicnoob Mar 29 '18 at 08:12
-
Your duplicate answer was an old school that not working anymore. – Drunken M Oct 31 '18 at 11:23
1 Answers
3
tab behaviour is controlled by the browser.
You wont have any way of controlling it from javascript.
Being able to control that kind of behaviour would be a serious security concern.

DevDonkey
- 4,835
- 2
- 27
- 41
-
i've seen some websites while we click on download, opens a new tab but focus is still on current tab. is there any way to do so? – preetham Mar 29 '18 at 08:12
-