Browsers scroll view slightly when opening "reply to" popup

Didn’t find a report of this, although I have seen it for a while.

I can reproduce this with FireFox 43 (and earlier) and Chromium 45.

When I click on the “reply to link” to open the popup of the post replied to, the view scrolls ever so slightly which is oddly unsettling. But only now I have noticed that the scroll gap seems to be as large as the padding of that post, and it proved to be right, because setting the following CSS solves the issue:

.embedded-posts.top.topic-body {
  padding: 0;
}

Did you (or some framework you use) perhaps miss padding (which is 12+15px by default) in your calculations?

Gif showcasing the issue:


I am also unsure about the doubled border-top placement here. Imo, the upper border should have full width, while he second one should either be small as it is now or not exist at all (in which case some white space could be removed). Static screenshot in this post.

2 Likes

Well if the CSS fix is side-effect free, please propose it as a PR! That’d be great!

If you could tell me about your intention with the borders regarding these inlined “reply to” posts (see last section of OP), then I will.

The current side-effect is that the inlined post gets a doubled border, which is effectively 2px thick.

Probably fine, go ahead and PR it! Thank you!

Unfortunatly I can not sign your CLA at this moment due to reasons. You will have to make this -2+1 line change yourself (or task someone else wih it).

Have you tried this with multiple replies being extended? Perhaps it was for distance between the 2+ replies that pop up?

No - can you even do that?

I mean, you can quote multiple people but afaik Discourse then does its special quote thing anyway.

Except you mean the other direction, i.e. the expansion downward. Which I didn’t actually test. I suppose I should check the CSS classes on those elements.

Okay, things look kinda bad when both upward and downward expansion are involved. (example post, and the one above)

This is an issue currently as well, though.

I think that upward expansion needs to be fixed in a sense that it looks like downward does currently, i.e. it should be inserted in a way that makes:

  1. The wide line appear above the in-reply-to and post rows
  2. The narrow line appear between the in-reply-to and post rows
  3. No double lines anywhere.

Fixing the scroll issue then becomes an afterthought.

This looks safe, so I am making the change. Thanks for this :+1:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.