Skip to content

Fix bookmarklet on mobile browsers, eg Firefox #50

@snarfed

Description

@snarfed

First off, thanks for maintaining Press This, it's great!

The bookmarklets stopped working for me in Firefox Mobile a while back; background in mozilla-mobile/fenix#2871 (comment). Turns out opening a new window was the culprit. I fixed it for myself by removing lines 149 (target) and 152 (window.open) here so that it opens in the current window instead:

form.setAttribute( 'target', target );
form.setAttribute( 'style', 'display: none;' );
window.open( 'about:blank', target, 'location,resizable,scrollbars,width=' + windowWidth + ',height=' + windowHeight );

We could just maintain a separate copy for mobile browser, but obviously it'd be better to keep them unified. I don't know how to sniff for mobile browsers though. Do you? Any idea how you'd want to incorporate this?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions