RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.17k stars 10.38k forks source link

Link to the message teleports to wrong scroll position in Firefox browser and electron app #24964

Open Kyogre opened 2 years ago

Kyogre commented 2 years ago

Description:

Link to the message teleports user to wrong scroll position when link opened in Firefox.

Steps to reproduce:

  1. Go to https://open.rocket.chat/channel/general
  2. Press "Get Link" in the context menu of any message, you will get the link like https://open.rocket.chat/channel/general?msg=XzCNzbMHjJ9usicMg
  3. Follow link from step 2.

Expected behavior:

Firefox loads the page, set correct scroll position focused on the correct post, then highlights it with yellow. Chrome browser is not affected at all, so you can see expected behavior there.

Actual behavior:

Firefox teleports user to the message before the page fully load, thus scroll position get changed and user can't see correct message. Video demo: https://user-images.githubusercontent.com/2260980/160237330-5e4c8cd1-5712-4990-8571-992dc8cb572b.mp4 Sometimes it doesn't reproduce and Firefox successfully achieves teleporting to correct position, but it happens very rarely.

Server Setup Information:

Checked on https://open.rocket.chat/channel/general

Client Setup Information

Additional context

Discussed here: https://forums.rocket.chat/t/link-to-message-teleports-to-wrong-scroll-position-in-firefox/13623

Kyogre commented 2 years ago

same happens, when you click on a link, contained in preview of a linked message, in a desktop app (Windows, rocket electron v3.8.1). Incorrect position and no highlighting. Demo: https://user-images.githubusercontent.com/2260980/161321162-0f13ab19-eef2-482f-a128-982dcb874885.mp4

himani-mehra commented 1 month ago

Hi @Kyogre , I would love to take on this issue and contribute to the project. Could you please assign it to me if it's available? Looking forward to your response. Thanks!

Kyogre commented 1 month ago

@juliajforesti hi! Can you assign, please?