candy
candy copied to clipboard
Autoscroll is broken on 2.0
Comparing my old install to the new 2.0, I can't get autoscroll working correctly on 2.0. It works just fine in the same webpage setup (using an iframe for Candy's div to avoid overwriting CSS) for the old 1.x release.
@mweibel Hi, didn't work for me... pulled candy yesterday but still, autoscroll seems broken. checked you fixed file an edited room.js manually just for testing this #402 fix
regards
didn't work for me also
Sorry, It works.
Reopening due to mailing list request. I will test shortly.
when a fix is issued for autoscrolling, can you include a line by line fix similar to this? I can't overwrite the 2.0 release because some modifications were made to allow CORS support.
https://github.com/candy-chat/candy/commit/542649ad95a59210a66f623551b386d6cd9e97f7
I don't understand what you mean, @amcorona. Could you be more clear?
When you do issue a fix for the autoscroll bug, will you include a diff view (show what lines changed in what files) so others can manually update lines of js instead of installing a new release? I ask because I had some developers on my end fix Cross Origin Resource Sharing issue where I could not embed a chat room on another server via iframe.
All changes are entered in git, so yes, @amcorona. If you have modifications to Candy, it would be good of you to contribute those back to the project considering the value you are extracting from it.
This appears to be an issue for me on Chrome 46.0.2490.80 but works in Safari 9.0.1 and Firefox
Please re-open the #401 autoscroll 'casue it's still bugy.
On Chrome Wersja 55.0.2883.87 m / Windows 7 64bit the autoscroll is working even in FireFox On some Windows XP it works also, but some people on my chat have issues like:
Having browser on 110% scaling autoscroll is not working, getting back to 100% makes autoscroll work, but when you do the scalling again they loose the autoscroll.
Sometimes the autoscroll works for some users randomly like 10 messages later the autoscroll scrolls to the newest message an again nothing for some time then boom another autoscroll.
I have teh newest version (2.2.0) in iframe on Wordpress.
I'm not in a position to be able to fix or test anything, unfortunately, but the following line looks suspect, and I would expect it to produce the behavior described in the previous comment https://github.com/candy-chat/candy/issues/401#issuecomment-270081511 :
From https://github.com/candy-chat/candy/commit/77777cd283c4ed7c5d963aced131ced066f406df
in src/view/pane/message.js:
var enableScroll = (messagePane.scrollTop() + messagePane.outerHeight()) === messagePane.prop('scrollHeight');
In my browser (chrome 93.0.4577.63), this is not a reliable test for "is scrolled to bottom".
Especially when browser-zoom is a not-nice value like 90% or 110%, when scrolled to bottom, it's typical for messagePane.scrollTop() to be a non-integer value such as 37570.91015625, while messagePane.outerHeight()==324 and messagePane.prop('scrollHeight')==37895 are always integers.
So in this case the code will wrongly think it's not scrolled to the bottom.
Various stackoverflow posts suggest using something like the following instead, as a more reliable test: var enableScroll = (messagePane.scrollTop() + messagePane.outerHeight()) > messagePane.prop('scrollHeight') - 1;