Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Autoscroll is broken on 2.0 #401

Open
wohali opened this issue Jul 11, 2015 · 11 comments
Open

Autoscroll is broken on 2.0 #401

wohali opened this issue Jul 11, 2015 · 11 comments
Labels

Comments

@wohali
Copy link

wohali commented Jul 11, 2015

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 mweibel added the Bug label Jul 13, 2015
mweibel added a commit that referenced this issue Jul 13, 2015
@l0bster
Copy link

l0bster commented Jul 22, 2015

@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

@predatell
Copy link

didn't work for me also

@predatell
Copy link

Sorry, It works.

benlangfeld added a commit that referenced this issue Aug 4, 2015
@wohali wohali closed this as completed Aug 11, 2015
@benlangfeld
Copy link
Member

Reopening due to mailing list request. I will test shortly.

@benlangfeld benlangfeld reopened this Aug 18, 2015
@amcorona
Copy link

amcorona commented Sep 3, 2015

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.

542649a

@benlangfeld
Copy link
Member

I don't understand what you mean, @amcorona. Could you be more clear?

@amcorona
Copy link

amcorona commented Sep 3, 2015

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.

@benlangfeld
Copy link
Member

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.

@kincl
Copy link

kincl commented Nov 5, 2015

This appears to be an issue for me on Chrome 46.0.2490.80 but works in Safari 9.0.1 and Firefox

@kaktus28
Copy link

kaktus28 commented Jan 3, 2017

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.

@donhatch
Copy link

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 #401 (comment) :

From 77777cd
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;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants