doc icon indicating copy to clipboard operation
doc copied to clipboard

Invoking search on a help page shifts the whole content to the left

Open VitGottwald opened this issue 1 year ago • 1 comments
trafficstars

Fist of all great job with the docs site and search!

I just tried it for the first time and tried searching and noticed a small glitch.

When I go to a doc page, for example https://neovim.io/doc/user/undo.html#undo-commands and I press CMD+K to invoke the search functionality, the whole content shifts to the right. After closing the search dialog, the content shifts back to the left

Untitled Untitled2

For some reason this does not happen on the main page https://neovim.io/doc/ .

VitGottwald avatar Apr 03 '24 14:04 VitGottwald

Patch welcome. Surely with all the web devs out there, someone could help with this?

justinmk avatar Apr 03 '24 20:04 justinmk

Hello:) I have tested it on my windows computer and it worked.

Bashamega avatar May 23 '24 09:05 Bashamega

Yeah, I can't reproduce this. I assume it was fixed by one of the recent CSS changes.

justinmk avatar May 23 '24 09:05 justinmk

Just tried it and it on https://neovim.io/doc/user/undo.html#undo-commands and I can reproduce it.

VitGottwald avatar May 23 '24 11:05 VitGottwald

Well I can't, so without a PR this is wontfix

justinmk avatar May 23 '24 12:05 justinmk

It is best visible with viewport width over 1200px. For smaller width the content of the second grid column with navigation shifts.

I am able to consistently reproduce it on Chrome, Safari, and Firefox.

It is apparently caused by .DocSearch--active class on body when the search is open. Removing the class or the rule overflow: hidden !important; it contains fixes the issue.

VitGottwald avatar May 23 '24 14:05 VitGottwald