Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why overriding browser.link.open_newwindow? #104

Open
emilio opened this issue Nov 24, 2019 · 5 comments
Open

Why overriding browser.link.open_newwindow? #104

emilio opened this issue Nov 24, 2019 · 5 comments

Comments

@emilio
Copy link

emilio commented Nov 24, 2019

'browser.link.open_newwindow': '2',

Changes the behavior of target="_blank" links. This is problematic for two reasons:

If there's a good reason to change default behavior like that, it'd be good to state why in a comment at least? :)

@saadtazi
Copy link
Owner

saadtazi commented Nov 24, 2019

Hi @emilio ,

The default preference were ported from the old python selenium code, which used to be located here (when I created this extension) but has been moved to here. The default prefs are now defined here here (using this build file).

So it seems like the default behaviour is still to use 'browser.link.open_newwindow': '2'. But I might have missed something.

@saadtazi
Copy link
Owner

saadtazi commented Nov 24, 2019

I checked my firefox install, it is set to 3 by default...

Note for self: here is an explanation of the different possible values for browser.link.open_newwindow: http://kb.mozillazine.org/Browser.link.open_newwindow .

This link states that the default value is 3 for firefox 2.0 (??? 👀 ???) and newer...

Summary: So this library seems to use the default value used by the default selenium libraries, but I don't understand why the selenium libraries still default to browser.link.open_newwindow = 2.

Any thoughts?

@emilio
Copy link
Author

emilio commented Nov 25, 2019

Not sure, the default value in Gecko is defined here: https://searchfox.org/mozilla-central/rev/a78233c11a6baf2c308fbed17eb16c6e57b6a2ac/browser/app/profile/firefox.js#431

But not sure why other libraries would change it.

@saadtazi
Copy link
Owner

I wouldn't mind setting it to 3, which will require increasing the major version of this library. Feel free to open a PR if you have time. If you don't have time but still think web-ext could benefit from it, let me know, I'll do it.

@emilio
Copy link
Author

emilio commented Nov 25, 2019

I sent mozilla/web-ext#1766 right before opening this issue for web-ext.

I don't know about other users of this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants