Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Pocket: Clicking Icon Does Nothing #4686

Closed
jonathansampson opened this issue Oct 11, 2016 · 5 comments · Fixed by brave/muon#79
Closed

Pocket: Clicking Icon Does Nothing #4686

jonathansampson opened this issue Oct 11, 2016 · 5 comments · Fixed by brave/muon#79
Assignees
Milestone

Comments

@jonathansampson
Copy link
Collaborator

jonathansampson commented Oct 11, 2016

Describe the issue you encountered:
Clicking the Pocket Icon resulted in no login window.

Expected behavior:
Clicking the Pocket Icon should result in a login window, or a saved-url notification.

Explanation:
The showLoginWindow method fires a message to the extension. When the message is received, window.open is called. This call is suppressed.

I added a check for isChrome() to avoid calling window.open, as you'll see in the previous link.

  • Platform: Windows 10
  • Brave Version: 0.12.4

Repro Steps:
https://github.com/jonathansampson/browser-laptop/tree/ext_pocket

@bridiver
Copy link
Collaborator

@jonathansampson are you sure it's trying to call window.open? If it is that's part of the problem because it should be calling chrome.tabs.create in the previous line

@darkdh
Copy link
Member

darkdh commented Oct 20, 2016

I modified the auth.js to call chrome.tabs.create directly and it will open a login tab.

@darkdh
Copy link
Member

darkdh commented Oct 20, 2016

isChrome requires window.chrome and window.chrome.app.
yeah it works with brave/muon@4f3eb57. but my auth.js of extension folder (version 2.1.7_0)copied chrome doesn't contain isChrome condition comparing to yours

@jonathansampson
Copy link
Collaborator Author

@bridiver @darkdh The method doesn't originally contain the isChrome() bit; I added that to avoid having to call window.open. Originally, the extension checks isSafari(), followed by isEdge(), followed by a fallback to window.open.

@bridiver
Copy link
Collaborator

I think Chrome must be passing that through as a user gesture somehow because it should be blocked otherwise

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

Successfully merging a pull request may close this issue.

5 participants