@mbuniverse
Student, Hobby Developer in Dart, Java, Node
Nothing here yet.
No blogs yet.
@hipkiss91 Because I have to act accordingly. Because when the users wants to open it in a new tab, I must not load the page via ajax. The current tab should stay the same
Sorry for confusing you. Yes I think it would work if I check if metaKey or ctrlKey is true in the onclick event. But what about the middle mouse click / mouse wheel click? But thanks anyway!
For example if you click the hashnode logo at the top of the page the startpage will load but without the browser loading a complete new webpage, the JavaScript just makes an ajax. But if I (as a user) want to open the startpage in a new window by holding CMD on Mac (or CTRL on Windows) the browser doesn't open a new tab My question is how can I detect whether the user wants to open a link in a new tab or in the same