Chat by Siropu

Chat by Siropu [Paid] 1.25.1

No permission to buy (€29.99)
If I upload an image to chat, after refreshing the page the image in chat points out (is in focus), not the last post in chat.
 
Me neither what I've written :)

Look here:
chat_1.gif

After page reload the chat jumps to an image and not the last post in chat.
 
I can't see attachments but I don't see in my test the problem you are describing. Doesn't meter what the messages contains, it always scrolls to the last message.
 
I can confirm the problem. It seems to happen on all modes except for "All Pages Mode".
It happens on my forums as well. I assume because the JS calculates the offset before the image appeares, thus when it appears, it offs by a huge margin (depending on the image's height). I could see a small delay before the attached image appeared on my forums, so it was obvious that the focus was moved to the bottom of the chat list before the image appeared.

Also, on all pages mode. If I've opened the chat for the first time, it would bring me to the bottom of the chat (which is as expected). But if I closed the chat and then opened it again, it would bring me to the top of the chat instead?
 
@BobbyWibowo, that seems to be the problem. Maybe a settTimeout of 500 milliseconds or more will fix that. As for the other issue, I can't reproduce it. I've tested it with Chrome, Firefox and IE.
 
@Siropu, perhaps try to add an onload handler for all attached images on the message list? Fetch all image links, make sure all of them fired onload event, and then calculate the offset? And I believe it's better to limit the waiting time though, just in case certain images aren't being loaded ever. I guess using jQuery's load event should work just fine on modern browsers.

Well, giving 500ms delay may work fine already though.

EDIT: As for the other issue. I don't know for sure. But sometimes, instead of bringing me to the top of the message list, it'd bring me to the middle of it. Though there were a few images on the message list (since I was testing the image issue).
 
@Shiro, it's not a bug with the message retrieval. It never happened to me so the only explanation I can find it's due to a slow server response when posting and refresh takes place at the same time as the message gets returned. Is refresh rate 1 second or more?
The refresh rate is two seconds.
 
Cases with images on chat appears to be working much better now. Sometimes it takes more than a second for me to load image for the first time, so it fails. But for cached images, seems to be working just fine.

Also, on all pages mode. If I've opened the chat for the first time, it would bring me to the bottom of the chat (which is as expected). But if I closed the chat and then opened it again, it would bring me to the top of the chat instead?
I'm still getting this issue, although only on Chrome. Just tested it on Firefox before I write this reply, and it appeared to be working fine.

EDIT: I checked the js file. And then I tried the same method used for the chat to scroll down with the browser's console, and it worked just fine. No idea why it doesn't scroll properly on normal cases though.

EDIT 2: Compared the behavior on Chrome and Firefox.
On Firefox, if I have the scroll at the most bottom, it will set data-autoscroll of #siropuChat to 1, and will remain that way even if I close the chat overlay. And when I open it again, it will remain on the bottom.
But on Chrome, if I have the scroll at the most bottom, it will have data-autoscroll to 1 as well, but when I close the chat overlay, it will turn to 0. And when I open it again, it scrolls me to the top?

EDIT 3: Managed to fix this by editing the js file. I changed so that it won't adjust maximized height and autoscroll on chat bar click if the chat overlay was being hidden.
 
Last edited:
i have updated and have some error message
Code:
rrorException: Fatal Error: syntax error, unexpected end of file - library/Siropu/Chat/ControllerPublic/Chat.php:654
Generiert durch: Unbekanntes Benutzerkonto, Vor 18 Minuten
Stapelverfolgung
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Benötigter Status
array(3) {
  ["url"] => string(53) "http://xxx/index.php?chat/refresh"
  ["_GET"] => array(1) {
    ["chat/refresh"] => string(0) ""
  }
  ["_POST"] => array(11) {
    ["room_id"] => string(1) "0"
    ["last_id"] => string(2) "83"
    ["inverse"] => string(1) "1"
    ["no_users"] => string(1) "0"
    ["show_ignored"] => string(1) "0"
    ["all_pages"] => string(1) "1"
    ["embedded"] => string(1) "0"
    ["_xfRequestUri"] => string(20) "/index.php?articles/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Back
Top Bottom