Recently, when you hover over a profile picture to get an expanded usercard, the comments move downwards. (If there are no comments, then the "Add a comment" link is the screen element which moves downwards.) This appears to be because of the user details moving from next to the picture to below it instead. Since I don't always keep careful track of where my mouse is, this has caused several jump-scares where elements of the page suddenly shifted without an obvious reason.
Here is a series of pictures to make what I am saying clear. First, the bottom of a question (note this happens for both questions and answers, though, I'm using a question merely for convenience):
Now, when I hover to expand the usercard, the comments move downwards (see the increase in whitespace between Catija's user information and the first comment):
I made the expanded usercard see-through by messing with my browser's CSS (just some visibility: hidden
), and it appears that the cause is the user information moving around:
(This last picture has the profile picture from the expanded usercard in a different position, as well as other minor shifts in layout - that's from the browser window being smaller in order to fit the console.)
Please restore the original, expected behavior, which is that hovering the usercard produces a popup but doesn't move anything else around; the expanded usercard simply overlays what was already there.
<div>
containing the hover popup is placed immediately after the.user-gravatar{32|48}
. Doing so causes the.user-details
, which usesfloat: left
, to wrap to below the gravatar. The popup appears to be placed there in order to be in the focus stack for keyboard navigation into the popup. It's viable to have the same focus stack (i.e. same keyboard navigation) if the popup is placed after the<a>
which is within the.user-gravatar{32|48}
(i.e. as the.user-gravatar{32|48}
's second, and last, child).selector
in the call toStackExchange.helpers.MagicPopup()
that's withinStackExchange.usermenu.init()
from.user-hover .user-gravatar48, .user-hover .user-gravatar32, .js-user-hover-target
to.user-hover .user-gravatar48 > a, .user-hover .user-gravatar32 > a, .js-user-hover-target
(i.e. use the<a>
link instead of the gravatar wrapper as the popup's reference). Additional testing would be needed to confirm that accomplishes all goals. There are, of course, various other alternative solutions, but that seems to be the easiest.