4 ms·
My biggest gripe with web browsers today is middle-click hijack. If I left-click on a link/picture, fine, you can do whatever you want. Fancy javascript, lightb
by pkamb 16y ago
My biggest gripe with web browsers today is middle-click hijack. If I left-click on a link/picture, fine, you can do whatever you want. Fancy javascript, lightboxes, the whole jazz. But if I middle-click that same link, by god it better be opening in a new tab in the background. No exceptions.
- bradleyland 16y agoI prefer lightbox implementations that extend a standard hyperlink to the enlarged image. If you middle-click, ctrl-click, etc, your browser grabs the URL from href and opens it in a new tab/window. The script is initiated by an event attached using a framework like jQuery, which uses a DOM query to locate links with a specific class. This has the additional upside of working as expected for users with JavaScript disabled. The implementations that fail miserably either use 'javascript:methodCall()' inside href, or have a kludgy onclick implementation. Built properly, a lightbox shouldn't get in the way of your desired behavior.
- pkamb 16y agoChromium bug for "Middle Click with named Target opening in foreground" http://code.google.com/p/chromium/issues/detail?id=62319 http://code.google.com/p/chromium/issues/detail?id=62319