Auto-jump to My New Posts in All Tabs in Same Thread
-
If I have two tabs open to the same thread (writing a post in one and reviewing posts in the other), when I submit the post I've been writing, both threads jump to the new post.
This means I have to find again the post I had been at in the other tab, which is irritating if the thread has lots of pages of posts and/or large posts.
Having the other tabs that are not at the end of the thread stay where they were is more useful because I don't have to try to find my place again.
-
@djls45 there's an option to turn that off. Then it won't jump to your new post in any of the tabs.
-
@anotherusername Thanks. I had forgotten about that.
So perhaps it's just a problem with me for a change that's counter to my expectations?
With that option enabled, it used to be that posting would only jump to that post in only the same tab that I posted in, but now posting will cause all tabs open to that thread to jump to my new post. And the latter was the originally intended functionality...?
-
I think it's more that two tabs on the same thread is :doingitwrong:
-
@djls45 OK, that's pretty bizarre. That seems to suggest that the command to jump to the new post is coming via a websocket from the server, rather than happening client-side as a result of the posting.
If we tracked it down to the root cause, I'd bet it would end up being something of the sort that Raymond Chen likes to call "a global solution to a local problem."
-
@masonwheeler Or that the response from the server saying "your post succeeded" is handled by both tabs, who have a global handler set up so that on "your post succeeded" event it jumps to the post.
-
@Arantor said in Auto-jump to My New Posts in All Tabs in Same Thread:
I think it's more that two tabs on the same thread is :doingitwrong:
I frequently keep a tab open on a post with a video to view later while I read the rest of the thread on a new tab.
-
@Zecc of course there are valid reasons for users to do this, but platform devs forget this, WONTFIX, WORKINGASDESIGNED, etc
-
@Yamikuronue said in Auto-jump to My New Posts in All Tabs in Same Thread:
@masonwheeler Or that the response from the server saying "your post succeeded" is handled by both tabs, who have a global handler set up so that on "your post succeeded" event it jumps to the post.
Yeah, I guess that this would be "fixed" by doing that in a callback, but given it affects multiple tabs it's obviously a WebSocket message...
It's a bit weird doing it over WebSockets, admittedly. Also, AFAIK each tab should open its own connection, no? Meaning that having "post success" messages reply only on a specific socket rather than the entire connection poll would also make it behave like it were a callback. No idea how tricky that would be though, I assume it's possible that this same message is used for streaming posts in for any other user looking at the thread too...
-
@Onyx said in Auto-jump to My New Posts in All Tabs in Same Thread:
each tab should open its own connection, no?
I'm not sure. In chrome, opening subsequent tabs shares the same process (or "process"?). I wonder if they re-use the socket connection too?
-
@Yamikuronue As luck would have it, I'm working on some WebSocket stuff today, so I just checked:
Using plain WebSockets which open connections on document load, duplicating a tab in Google opens a new TCP connection. I see new socket descriptors being spawned for every duplicated tab, so that means separate WebSocket connections are being opened.
So purely from Chrome's side, they are distinct. Whether socket.io and/or NodeBB consider them as a single connection using some kind of custom pooling code I do not know.