prose-im / prose-app-web

Prose Web application. XMPP client for team messaging.
https://prose.org/downloads
Mozilla Public License 2.0
19 stars 2 forks source link

Clicking a notification sometimes scrolls into the void #105

Open nesium opened 3 weeks ago

nesium commented 3 weeks ago

Had this result recently after clicking a notification. I had a different room selected before clicking. Sometimes the chat is even completely blank, but it can be fixed by scrolling.

Screenshot 2024-06-06 at 11 54 54
valeriansaliou commented 3 weeks ago

I've also seen this from time to time.

Is the app visible or hidden when you click on a notification and this happens? (hidden as in, you clicked on the red close window action or used CMD+W or minimized)

Note that the "message view appearing white" thing is rather a bug of the Web View used in Tauri, which does not appear in a Safari browser or other browsers. I'm circumventing it by triggering fake scrolls (1px up, 1px down in situations where this happens — dirty but works, let's see if it's needed here once the actual scroll position issue gets fixed).

nesium commented 3 weeks ago

I'm fairly sure that it was just sitting behind another active window, but I'll keep an eye on that and report back.

nesium commented 3 weeks ago

Tested it a bit more. If the app is not the front-most app and you click a notification where the corresponding room is not selected already it is reproducible every time. Note that neither the main window is closed, nor the application is hidden, it is just not the keyWindow. If the app is front-most it works as expected.

Maybe Tauri does something to the webView if the surrounding window becomes the key window?

nesium commented 3 weeks ago

As a dirty workaround you could try to set the scroll position after a brief timeout to see if that works.