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

Cannot shrink the sidebar #265

Closed
dniku opened this issue Sep 11, 2015 · 26 comments
Closed

Cannot shrink the sidebar #265

dniku opened this issue Sep 11, 2015 · 26 comments
Labels

Comments

@dniku
Copy link

dniku commented Sep 11, 2015

I expanded the sidebar by dragging its edge to the right, and now I cannot shrink it: every time I drag its edge to the left and release the mouse, it jumps back to where it started. Chrome 44.0.2403.157 (64-bit).

@Thibaut
Copy link
Member

Thibaut commented Sep 12, 2015

Does the sidebar resize while you drag? Does it jump back immediately when you release the mouse, or after you reload the page?

@dniku
Copy link
Author

dniku commented Sep 13, 2015

It does resize while I drag it, and it jumps back immediately as soon as I release the mouse. I've just tested it in Chrome's private mode with all extensions disabled.

@Thibaut
Copy link
Member

Thibaut commented Sep 13, 2015

What does window.screenX give you in the console?

@Thibaut
Copy link
Member

Thibaut commented Sep 14, 2015

I just deployed a change that may fix the issue.

@dniku
Copy link
Author

dniku commented Sep 14, 2015

The problem is still there.

> window.screenX
< 1600

Also, every time I try to resize the sidebar, the console receives:

Application Cache Checking event (index):1
Application Cache NoUpdate event (index):1

If I wipe all data from the site (through Chrome's "green lock" icon in the address bar and repeatedly clicking on "delete"), and I click "uninstall/reset the app", after the page finishes reloading the sidebar may already be back to normal, or I might get the notification that devdocs.io was updated. I click "go to the new version" and the sidebar shrinks back to its normal size, right until I try to resize it again.

The width is fixed at 600px. Unticking the "width" attribute of ._list restores it to 288px, but disables the ._resizer.

@FallenMax
Copy link

I'm also having this problem and I found a workground:
Delete this cookie width=600 and refresh page, sidebar will shrink to default width.

Just refrain from resizing it again, because that will set it back to 600px...

@Thibaut Thibaut added the bug label Oct 11, 2015
@Thibaut
Copy link
Member

Thibaut commented Oct 18, 2015

Which OS are you using?

@dniku
Copy link
Author

dniku commented Oct 18, 2015

Gentoo Linux.

@mishak87
Copy link

mishak87 commented Nov 6, 2015

👍 600px Ubuntu 14.04
window.screenX == 1920

@nreynis
Copy link

nreynis commented Nov 16, 2015

I have the same issue on Opera / Windows 10.
Any attemp to resize the sidebar will fail and the sidebar will always grow to a very large width on drop.

@Thibaut
Copy link
Member

Thibaut commented Nov 21, 2015

I just deployed a potential fix. Could one of you try to reproduce again? (reload twice to get the new version)

@nreynis
Copy link

nreynis commented Nov 21, 2015

Yep, that fixed the issue for me (test done on Opera / Windows 7).
Thanks !

@mishak87
Copy link

Not for me size fixes at 600.

@dniku
Copy link
Author

dniku commented Dec 1, 2015

Works for me in Chrome under Kubuntu 15.10. I'll check this under Gentoo later.

@dniku
Copy link
Author

dniku commented Dec 2, 2015

Still broken for me under Gentoo, but in a very weird way.

I can shrink the sidebar to the minimum width of 260px (according to the "Computed" tab under "Elements" in Chrome's developer console). When I start enlarging it by dragging it left-to-right, the sidebar follows the cursor smoothly. However, as soon as I release the mouse, it instantly jumps to a larger width, which is variable and depends on the width to which I enlarged it by dragging. Examples:

  • 270 → 337
  • 280 → 350
  • 300 → 375
  • 350 → 437
  • 400 → 500

It looks like it always jumps by a factor of 5/4.

@Thibaut
Copy link
Member

Thibaut commented Dec 6, 2015

This bug is quite insane. The same code runs onDrag and onDragEnd. Both read the cursor position from event.pageX but somehow onDragEnd ends up writing a different value, when it should always be the same as the last onDrag value (which is what I get on all the browsers I've tested). I even added a check that the dragend value is within 5px of the last drag value a couple weeks ago.

@Pastafarianist could you check that there is "lastDragValue" in the script running DevDocs? (file like /assets/application-[hash].js) Maybe the cache didn't update or something.

Is your browser window aligned with the top left corner of your screen? full screen?

@dniku
Copy link
Author

dniku commented Dec 6, 2015

image

The Chrome window is typically maximized. I enabled full screen to take the screenshot.

I've also just checked that the bug is reproducible in incognito with all extensions disabled and with a non-maximized window.

Most surprising is that under Kubuntu I am using Chrome 47.0.2526.73 which is logged in the same Google account (hence all extensions are synchronized), and it doesn't have the issue.

@fvsch
Copy link

fvsch commented Jan 11, 2016

Firefox 43 on Windows: no resizing happens when dragging, and when releasing the sidebar is resized more or less accurately.

Firefox 45 (DevEdition) on Windows: no resizing happens when dragging, when releasing the sidebar is set at 600px (always), and can't be resized to a different value.

@Thibaut
Copy link
Member

Thibaut commented Jan 12, 2016

no resizing happens when dragging

This is "normal". Firefox doesn't expose mouse coordinates on drag events. See https://bugzilla.mozilla.org/show_bug.cgi?id=505521 ¯_(ツ)_/¯

when releasing the sidebar is set at 600px (always), and can't be resized to a different value.

Unfortunately I can't replicate (I use BrowserStack) and ran out of ideas for how to fix this :/
Will try again later…

@abelrgr
Copy link

abelrgr commented Jan 21, 2016

Hi guys in my case is something funny, I have two monitors: 1=1920x1080, 2=1360x768. When I resize the sidebar in the second monitor cannot stretch again:
anim
But when I move the browser to the first monitor I can reduce the sidebar.

My specs:
Chrome Version 47.0.2526.111
Linux Mint 17.2 XFCE 64-bit

@mishak87
Copy link

@chule143 You might have just found the root cause. I am working on dual/triple setups so long that I didn't realize that it could be the issue.

@Kaijiro
Copy link

Kaijiro commented Jan 22, 2016

I managed to reproduce this bug with your datas @chule143 :

  • Opened DevDocs on the first screen, resize sidebar.
  • Change DevDocs screen, try to resize sidebar => impossible.
  • Move DevDocs on the first screen again, and then, I can change sidebar size.

@abelrgr
Copy link

abelrgr commented Jan 23, 2016

Using window.innerWidth instead window.screenX works for dual monitors (only for modern browsers IE9+ xD) #337

@Thibaut
Copy link
Member

Thibaut commented Jan 24, 2016

Thanks for the investigation. I'll take a look soon.

@Thibaut
Copy link
Member

Thibaut commented Jan 31, 2016

#337 didn't fix the issue but I believe a24a2ce does. Let me know if not. Thanks all for helping debug this!

@dniku
Copy link
Author

dniku commented Feb 1, 2016

Works for me both on Kubuntu and on Gentoo. Thanks!

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

No branches or pull requests

8 participants