Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll to bottom when container resized #89

Open
SupertigerDev opened this issue Sep 11, 2020 · 10 comments
Open

Scroll to bottom when container resized #89

SupertigerDev opened this issue Sep 11, 2020 · 10 comments
Assignees

Comments

@SupertigerDev
Copy link

Describe the bug
When the window is resized, scroll does not stick at the bottom

To Reproduce
Steps to reproduce the behavior:

  1. resize window

Expected behavior
Content Scroll should stick at the bottom

@theomessin
Copy link
Owner

This will be fixed with version 2 since we'll be using a ResizeObserver! See #72.

@theomessin theomessin added feature and removed bug labels Sep 20, 2020
@theomessin theomessin changed the title Resizing window Scroll to bottom when container resized Sep 20, 2020
@SupertigerDev
Copy link
Author

Epic thanks!

@theomessin
Copy link
Owner

theomessin commented Sep 20, 2020

I was wrong - I don't think a resize observer will fix this. The problem arises when the chat container height is relative - otherwise the scroll position should remain where it should.

We can code around this by listening to a window resize event and scrolling then. Let's leave this open and see what other people think.

@IAmShafqatAli
Copy link

This issue is still valid, on resize it should stick to bottom

@SupertigerDev
Copy link
Author

SupertigerDev commented Jan 19, 2021

which browser and os?

@IAmShafqatAli
Copy link

@supertiger1234 Resize issue is in chrome and FF windows 10

@SupertigerDev
Copy link
Author

Oh wait, I thought this was one of my projects. Oops 😂

@IAmShafqatAli
Copy link

IAmShafqatAli commented Jan 20, 2021

No worries at all :)

Well, do you have any idea how can I solve the this problem ? I wrote as help wanted yesterday but I couldn't find anything that can solve issue, I wrote yesterday this text below.

Thank you so much for the work that you have done to create this package, it made my life easier :) However there is one thing that I am still cannot manage to do, that is if in chat window I scrolled in the middle of container and I sent the message, it doesn't scroll to bottom (perfect and expected behavior) but I would like to make a button that can help me scroll bottom and there is no event in this package that tells me that scroll to bottom is not achieved, i.e (v-chat-scroll-top-reached ) is the event if div top is reached. What if there is an event that can tell that in is somewhere in middle neither top or bottom, I can then use that event to show scroll to bottom button.

I there are a lot of work around for that, in JS but any suggestion from your side in this package will be highly appreciated.```

@SupertigerDev
Copy link
Author

I'm not sure. I just didn't use this lib and just manually scrolled to the bottom when required

@theomessin
Copy link
Owner

theomessin commented Jan 20, 2021

Guys this is an open-source project. I don't actually use this package anymore, I just maintain it. I've got other stuff going on and this is pretty much at the bottom of my priority list. Feel free to submit a pull request if you feel like helping. Otherwise, you'll just have to wait until I do all the other things I have to do before I get to this.

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

No branches or pull requests

3 participants