-
Notifications
You must be signed in to change notification settings - Fork 894
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
FR: Focus tab of the same origin (but not with the same url) #390
Comments
I would like to take this on as it's currently affecting our project forcing to workaround it by making use of |
Did you find any solution to this huge problem? |
I think it could be easily resolved, instead of the equal operator (here), we could use an include instead I will make a PR with that 🙂 ----- Edit Done 😄 |
Hi Nicolas,
It sounds great, but where is this file located?
Shlomo Aran
054-7399-340
…On Fri, Mar 20, 2020 at 11:20 AM Nicolas Delperdange < ***@***.***> wrote:
I think it could be easily resolved, instead of the equal operator (here
<https://github.com/firebase/firebase-js-sdk/blob/master/packages/messaging/src/controllers/sw-controller.ts#L282>),
we could use an include instead
I will make a PR with that 🙂
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#390 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLKC3ISCBU56SNGQZRX6EDRIMYODANCNFSM4EI5OVVQ>
.
|
I have made the pull request, waiting for maintainers to review 🙂 |
Hi Nicolas,
Now I realize that you are the firebase programmer.
So,
1. this really a great product!
2. This problem is huge, so if you can solve it, it will make it much
better.
Please do it as soon as you can, and let me know when I can use it.
Thanks,
Shlomo;
Shlomo Aran
054-7399-340
…On Fri, Mar 20, 2020 at 11:20 AM Nicolas Delperdange < ***@***.***> wrote:
I think it could be easily resolved, instead of the equal operator (here
<https://github.com/firebase/firebase-js-sdk/blob/master/packages/messaging/src/controllers/sw-controller.ts#L282>),
we could use an include instead
I will make a PR with that 🙂
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#390 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLKC3ISCBU56SNGQZRX6EDRIMYODANCNFSM4EI5OVVQ>
.
|
Thank you so much.
Shlomo Aran
054-7399-340
…On Fri, Mar 20, 2020 at 11:37 AM Nicolas Delperdange < ***@***.***> wrote:
I have made the pull request, waiting for maintainers to review 🙂
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#390 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLKC3PFA52GW44T2RBC5Y3RIM2NTANCNFSM4EI5OVVQ>
.
|
Hi Nicolas,
I received a message that the issue of oenning "new page" when the origin
is the same is closed.
Is this means that it is done, or it was rejected.
It is extremely important and you wrote that it is simple to implement.
If it is done, do I need to do something in my code to get it, or is it
coming from the server?
Thanks.
Shlomo Aran
054-7399-340
…On Fri, Mar 20, 2020 at 11:20 AM Nicolas Delperdange < ***@***.***> wrote:
I think it could be easily resolved, instead of the equal operator (here
<https://github.com/firebase/firebase-js-sdk/blob/master/packages/messaging/src/controllers/sw-controller.ts#L282>),
we could use an include instead
I will make a PR with that 🙂
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#390 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLKC3ISCBU56SNGQZRX6EDRIMYODANCNFSM4EI5OVVQ>
.
|
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
When receiving a push message with a
click_action
in the notification payload, the service-worker tries to find a tab with the same url than theclick_action
.If it succeeds, the service worker focus this tab.
If it fails, the service worker opens a new tab (or window).
But the url of the tab has to be exactly the same url than the
click_action
.If a tab with the same origin than the
click_action
but with a different url (a different page, for my case in a one page application with Polymer) is found, the service worker will open a new tab instead of focusing this tab and send a message to it (to tell the application to change the page for example).Steps to reproduce:
1.b. Navigate into the application
Relevant code :
getWindowClient_(url) {
firebase-js-sdk/packages/messaging/src/controllers/sw-controller.ts
Line 265 in 7db74e6
Example
Notification payload:
{ notification: { 'title': 'Title', 'body': 'Message body', 'click_action': 'https://example.firebaseapp.com/demo/commands/' } }
Url of the inactive tab :
https://example.firebaseapp.com/demo
The text was updated successfully, but these errors were encountered: