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

sidebar floats left in narrow window #1308

Closed
judell opened this issue Aug 16, 2019 · 3 comments
Closed

sidebar floats left in narrow window #1308

judell opened this issue Aug 16, 2019 · 3 comments
Assignees

Comments

@judell
Copy link
Contributor

judell commented Aug 16, 2019

image

Animation: http://jonudell.info/h/sidebar-floats-left-in-narrow-window.gif

@robertknight
Copy link
Member

robertknight commented Dec 16, 2020

I was able to reproduce this using the Chrome extension on http://example.com:

  1. Go to https://example.com
  2. Activate Chrome extension and open sidebar
  3. Reduce window size to a width of less than 600 pixels

Sidebar float left

@lyzadanger
Copy link
Contributor

This isn't surprising, really, when I think about it. Our responsive layout/breakpoints likely need some attention.

@lyzadanger
Copy link
Contributor

lyzadanger commented Dec 16, 2020

It looks like the crux of this problem is an inline style added by src/annotator/sidebar in the show() method. This inline left-margin value is not updated on window resize. If you collapse and re-show the sidebar, it will no longer "float" because the show method in the sidebar will update the inline style with an updated value.

On the other hand, this shouldn't happen if you haven't resized the window.

@esanzgar esanzgar self-assigned this Jan 15, 2021
@esanzgar esanzgar linked a pull request Feb 16, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants