Merge pull request #4473 from BenLubar/reply-quote-bounds-fix

fix topic reply button
v1.18.x
Julian Lam 9 years ago
commit b68058b093

@ -201,7 +201,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
var selection = window.getSelection ? window.getSelection() : document.selection.createRange();
var content = button.parents('[component="post"]').find('[component="post/content"]').get(0);
if (selection.containsNode(content, true)) {
if (content && selection.containsNode(content, true)) {
var bounds = document.createRange();
bounds.selectNodeContents(content);
var range = selection.getRangeAt(0).cloneRange();

Loading…
Cancel
Save