FIX: Docking of old widget regressed
This commit is contained in:
parent
b37e14fc62
commit
321a11fe41
|
@ -120,7 +120,6 @@ export default Ember.Component.extend({
|
|||
const maximumOffset = $('#topic-footer-buttons').offset(),
|
||||
composerHeight = $('#reply-control').height() || 0,
|
||||
$topicProgressWrapper = this.$(),
|
||||
style = $topicProgressWrapper.attr('style') || '',
|
||||
offset = window.pageYOffset || $('html').scrollTop();
|
||||
|
||||
let isDocked = false;
|
||||
|
@ -132,11 +131,11 @@ export default Ember.Component.extend({
|
|||
isDocked = offset >= threshold - windowHeight + topicProgressHeight + composerHeight;
|
||||
}
|
||||
|
||||
const dockPos = $(document).height() - $('#topic-bottom').offset().top;
|
||||
|
||||
if (composerHeight > 0) {
|
||||
if (isDocked) {
|
||||
if (style.indexOf('bottom') >= 0) {
|
||||
$topicProgressWrapper.css('bottom', '');
|
||||
}
|
||||
$topicProgressWrapper.css('bottom', dockPos);
|
||||
} else {
|
||||
const height = composerHeight + "px";
|
||||
if ($topicProgressWrapper.css('bottom') !== height) {
|
||||
|
@ -144,9 +143,7 @@ export default Ember.Component.extend({
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (style.indexOf('bottom') >= 0) {
|
||||
$topicProgressWrapper.css('bottom', '');
|
||||
}
|
||||
$topicProgressWrapper.css('bottom', isDocked ? dockPos : '');
|
||||
}
|
||||
this.set('docked', isDocked);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue