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

Focus the tab and allow pageless redirect for notification.onclick #1448

Conversation

nickvergessen
Copy link
Member

Steps

  1. Have talk with feat(performance): Open conversations from notifications without page reload spreed#8713
  2. (Best to use chrome)
  3. Open talk with user 1 (don't open any chat)
  4. Open talk with user 2 in another window
  5. As user 2 mention user 1 in a chat
  6. Open another window of any other program
  7. Wait for the browser notification
  8. Click the content of the notification
  9. See the correct chat being page-reload-less opened for user 1 (Optional: and the browser being in the foreground (only works reliable in chrome), removing event.preventDefault() makes it work in Firefox when the last interaction was not too long ago)

@Antreesy
Copy link
Collaborator

Antreesy commented Feb 8, 2023

Seems to work in Firefox too. Click on laptop notification returns browser to foreground and opens chat (without page refresh)
Screenshot from 2023-02-08 09-15-29

Tried with:

  • active Firefox tab, browser window on background.
  • active Firefox tab, browser window on foreground.
  • active Firefox tab, browser window is minimized.
  • inactive Firefox tab (another tab is opened), browser window on background.
  • inactive Firefox tab, browser window on foreground.
  • inactive Firefox tab, browser window is minimized.

Also tried:

  • active Chrome tab, browser window on background.
  • active Chrome tab, browser window on foreground.
  • active Chrome tab, browser window is minimized.
  • inactive Chrome tab, browser window on background. ⚠️ notification appears only after tab is opened ⚠️
  • inactive Chrome tab, browser window on foreground. ⚠️ notification appears only after tab is opened ⚠️
  • inactive Chrome tab, browser window is minimized.

…ications

This allows Talk to jump to the chat without a page refresh again.

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the bugfix/noid/focus-the-tab-and-allow-pageless-redirect-for-onclick branch from 0f8bb6c to d464a68 Compare February 8, 2023 09:00
@nickvergessen nickvergessen merged commit 5cb9cdc into master Feb 8, 2023
@nickvergessen nickvergessen deleted the bugfix/noid/focus-the-tab-and-allow-pageless-redirect-for-onclick branch February 8, 2023 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants