webianproject / shell

Webian Shell - A graphical shell for the web (desktop version)
http://webian.org/shell
GNU General Public License v3.0
135 stars 25 forks source link

Open link in new tab #96

Open samwwwblack opened 13 years ago

samwwwblack commented 13 years ago

As a user I'd like to open a link in a new tab

Suggested by Daniel Puig on the Google Group https://groups.google.com/forum/?hl=en#!topic/webian/eCyAAPsjVsE and Ivan Kovačević on GetSatisfaction http://getsatisfaction.com/webian/topics/enable_right_and_middle_mouse_click

Also suggested by 2 Bit Entendre http://getsatisfaction.com/webian/topics/open_link_in_new_tab-17u8st

maartenJacobs commented 13 years ago

I've looked into this, but accessing the document of an iFrame (to set a listener on the click event of a-tags) is pretty much a cross-domain policy breach.

Does anyone have any experience with this kind of issue? Because I'm not really sure how we can fix this.

mzlee commented 13 years ago

It appears it may be possible to bind a load event to each iframe. From there, it would be a mess of trying to figure out if the page should be loaded in a new tab (and other state reset). Nicer events like click and unload didn't seem to register.

(running on Ubuntu 10.4)

edit: I have some proof of concept code that works but it's a terrible experience. Digging through a bit more of chromeless reveals the ability to both inject code and emit events. This might be a more reasonable route, but they both break the iframe's integrity.