FIX: When cloaked, posts would break jumping to top/bottom
This commit is contained in:
parent
ad3a58b171
commit
ff31403a60
|
@ -76,7 +76,7 @@ const DiscourseURL = Ember.Object.createWithMixins({
|
|||
},
|
||||
|
||||
// Scroll to the same page, different anchor
|
||||
scrollToId: function(id) {
|
||||
scrollToId(id) {
|
||||
if (Em.isEmpty(id)) { return; }
|
||||
|
||||
_jumpScheduled = true;
|
||||
|
|
|
@ -379,9 +379,11 @@ export default createWidget('post', {
|
|||
shadowTree: true,
|
||||
|
||||
buildAttributes(attrs) {
|
||||
if (attrs.cloaked) {
|
||||
return { style: `height: ${attrs.height}px` };
|
||||
}
|
||||
return attrs.cloaked ? { style: `height: ${attrs.height}px` } : undefined;
|
||||
},
|
||||
|
||||
buildId(attrs) {
|
||||
return attrs.cloaked ? `post_${attrs.post_number}` : undefined;
|
||||
},
|
||||
|
||||
buildClasses(attrs) {
|
||||
|
|
Loading…
Reference in New Issue