mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 12:25:44 +08:00
FIX: Quote popup broke in refactor
This commit is contained in:
parent
a04924deea
commit
1308dbbef7
@ -55,15 +55,9 @@ Discourse.QuoteButtonController = Discourse.Controller.extend({
|
|||||||
if (this.get('buffer') === selectedText) return;
|
if (this.get('buffer') === selectedText) return;
|
||||||
|
|
||||||
// we need to retrieve the post data from the posts collection in the topic controller
|
// we need to retrieve the post data from the posts collection in the topic controller
|
||||||
var posts = this.get('controllers.topic.posts'),
|
|
||||||
length = posts.length,
|
|
||||||
post;
|
|
||||||
|
|
||||||
for (var p = 0; p < length; p++) {
|
var postStream = this.get('controllers.topic.postStream');
|
||||||
if (posts[p].id === postId) { post = posts[p]; break; }
|
this.set('post', postStream.findLoadedPost(postId));
|
||||||
}
|
|
||||||
|
|
||||||
this.set('post', post);
|
|
||||||
this.set('buffer', selectedText);
|
this.set('buffer', selectedText);
|
||||||
|
|
||||||
// collapse the range at the beginning of the selection
|
// collapse the range at the beginning of the selection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user