Daemonite / discourse-material-theme

Material Design for Discourse
MIT License
21 stars 28 forks source link

Clipped "Save Edit" / "Cancel" buttons when editing longer posts in untall editor #9

Open amotl opened 5 years ago

amotl commented 5 years ago

Problem

When editing posts, the "Save Edit" / "Cancel" buttons image

are slightly off their intended positions like depicted in this screenshot: image

Observations

This happens under certain conditions, mostly observed when editing posts. It hasn't happened when adding new posts or when replying.

It looks like this does not happen with short posts on the first position i.e. where the distance from the top of the page is short. Saying that, it does happen with first posts which are vertically larger and also usually happens with subsequent posts on a page, as they usually do have a reasonable distance from the top.

amotl commented 5 years ago

Workaround

We found that by resetting the display css attribute here, the buttons stopped being displaced.

/* Fix DMT#9: "Save Edit" / "Cancel" buttons slightly off when editing posts */
#reply-control .submit-panel {
    display: initial !important;
}
sesemaya commented 5 years ago

We are currently on 2.3.0.beta2 and I cannot reproduce this problem. Maybe other recent changes or recent Discourse updates fixed this problem?

amotl commented 5 years ago

We have been able to conduct further experiments on https://meta.ip-tools.org/t/test-thing/140.

We found that everything will be fine with short posts, while editing longer posts will push the "Save" / "Cancel" buttons out of the viewport when decreasing the editor panel height. We are running Discourse v2.3.0.beta6 +148 and the most recent discourse-material-theme and are looking at it through Firefox 66.0.2.

Resetting the display css attribute as outlined above still mitigates the issue for us.

Action buttons visible

image

Clipped action buttons

image

Thanks already for looking into this if you can afford the time and thanks for your efforts again. As this is easy to fix and does not have a high impact, it's still to be considered a minor issue. However, we still wanted to share our investigations on this.