Browsers scroll view slightly when opening "reply to" popup

(FichteFoll) #1

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: {
  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.

"Reply to" popup on post after time gap is misaligned
"Reply to" popup on post after time gap is misaligned
(Jeff Atwood) #2

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

(FichteFoll) #3

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.

(Jeff Atwood) #4

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

(FichteFoll) #5

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).

(Jeff Atwood) #6

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

(FichteFoll) #7

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.

(FichteFoll) #8

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.

"Reply to" popup on post after time gap is misaligned
(Jeff Atwood) #9

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

(Jeff Atwood) #10

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