##// END OF EJS Templates
Fixed adding post id to quote in chrome
neko259 -
r1587:5262969c default
parent child Browse files
Show More
@@ -138,12 +138,16 b' function showQuoteButton() {'
138 138
139 139 var rect = window.getSelection().getRangeAt(0).getBoundingClientRect();
140 140 var element = $(document.elementFromPoint(rect.x, rect.y));
141 var postParent = element.parents('.post');
142 if (postParent.length > 0) {
143 quoteButton.attr('data-post-id', postParent.attr('id'));
141 var postId = null;
142 if (element.hasClass('post')) {
143 postId = element.attr('id');
144 144 } else {
145 quoteButton.attr('data-post-id', null);
145 var postParent = element.parents('.post');
146 if (postParent.length > 0) {
147 postId = postParent.attr('id');
148 }
146 149 }
150 quoteButton.attr('data-post-id', postId);
147 151 } else {
148 152 quoteButton.hide();
149 153 }
General Comments 0
You need to be logged in to leave comments. Login now