JQuery scrollTop issues for android
Posted: Fri Aug 23, 2013 9:32 pm
It seems android is more annoying than ie when it comes to this (for me at least ) The problem is that the JQuery scrollTop works on every device except android when it comes to overflow beind set to auto, or scroll. There is a workaround that is supposed to work, but it seems it doesn't for me. This is the workaround:
PS: Any attempts to find the location of scrollTop will be useless because android has a bug where it is always 0.
$("#chat_container").css('overflow', 'hidden'); $("#chat_container").scrollTop($("#chat_container")[0].scrollHeight); $("#chat_container").css('overflow', 'auto');It seems that the css is executing before the scrolltop, even with a delay() added to setting overflow back to auto. Without setting overflow back to auto, the scroll works, but users can't scroll because the overflow is now hidden...any ideas would be greatly appreciated
PS: Any attempts to find the location of scrollTop will be useless because android has a bug where it is always 0.