UX: Topic progress was docked in the wrong place.

This commit is contained in:
Robin Ward 2016-06-01 15:38:36 -04:00
parent 9704603fab
commit a8fba38486
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
1 changed files with 5 additions and 6 deletions

View File

@ -126,18 +126,17 @@ export default Ember.Component.extend({
const maximumOffset = $('#topic-footer-buttons').offset(),
composerHeight = $('#reply-control').height() || 0,
$topicProgressWrapper = this.$(),
offset = window.pageYOffset || $('html').scrollTop();
offset = window.pageYOffset || $('html').scrollTop(),
topicProgressHeight = $('#topic-progress').height();
let isDocked = false;
if (maximumOffset) {
const threshold = maximumOffset.top,
windowHeight = $(window).height(),
topicProgressHeight = $('#topic-progress').height();
const threshold = maximumOffset.top;
const windowHeight = $(window).height();
isDocked = offset >= threshold - windowHeight + topicProgressHeight + composerHeight;
}
const dockPos = $(document).height() - $('#topic-bottom').offset().top;
const dockPos = $(document).height() - $('#topic-footer-main-buttons').offset().top - topicProgressHeight;
if (composerHeight > 0) {
if (isDocked) {