mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: When cloaked, posts would break jumping to top/bottom
This commit is contained in:
parent
ad3a58b171
commit
ff31403a60
2 changed files with 6 additions and 4 deletions
|
@ -76,7 +76,7 @@ const DiscourseURL = Ember.Object.createWithMixins({
|
||||||
},
|
},
|
||||||
|
|
||||||
// Scroll to the same page, different anchor
|
// Scroll to the same page, different anchor
|
||||||
scrollToId: function(id) {
|
scrollToId(id) {
|
||||||
if (Em.isEmpty(id)) { return; }
|
if (Em.isEmpty(id)) { return; }
|
||||||
|
|
||||||
_jumpScheduled = true;
|
_jumpScheduled = true;
|
||||||
|
|
|
@ -379,9 +379,11 @@ export default createWidget('post', {
|
||||||
shadowTree: true,
|
shadowTree: true,
|
||||||
|
|
||||||
buildAttributes(attrs) {
|
buildAttributes(attrs) {
|
||||||
if (attrs.cloaked) {
|
return attrs.cloaked ? { style: `height: ${attrs.height}px` } : undefined;
|
||||||
return { style: `height: ${attrs.height}px` };
|
},
|
||||||
}
|
|
||||||
|
buildId(attrs) {
|
||||||
|
return attrs.cloaked ? `post_${attrs.post_number}` : undefined;
|
||||||
},
|
},
|
||||||
|
|
||||||
buildClasses(attrs) {
|
buildClasses(attrs) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue