linkding icon indicating copy to clipboard operation
linkding copied to clipboard

Bookmarklet does not close window after saving bookmark in Firefox

Open zbyna opened this issue 2 years ago • 3 comments

According to the documentation:

I suppose that window for adding a new bookmark should be closed. Unfortunately, this does not work in up-to-date Firefox.

firefox_E9jkJiHmRc

I am using fresh installed system:

Linkding 1.17.1 (latest)
Browser Firefox 109.0.1 (64-bit)
OS Windows 10 Pro 22H2 Build: 19045.2486

zbyna avatar Feb 13 '23 05:02 zbyna

I just started looking into this myself. I noticed that the behavior differs between browsers and seems to primarily affect Firefox. Possible workaround I wanted to look into.

https://stackoverflow.com/questions/12314729/close-windows-that-were-not-opened-by-script-using-javascript

twalling avatar Feb 16 '23 19:02 twalling

@twalling Thanks for tip!.

I tried using, window.open(applicationUrl, '_self' ) as suggested by the link you posted—without success. But it led me to the: https://stackoverflow.com/questions/19761241/window-close-and-self-close-do-not-close-the-window-in-chrome which states:

Firefox is secure against that exploit. So, the only JavaScript way is to cripple the security settings, one browser at a time. You can open up about:config and set allow_scripts_to_close_windows to true. There currently is no equivalent setting for Chrome.

I have found only this setting: dom.allow_scripts_to_close_windows and setting this to true enable the bookmarklet to close the window.

zbyna avatar Feb 17 '23 05:02 zbyna

Let's keep this open as a known issue.

sissbruecker avatar Feb 17 '23 07:02 sissbruecker