mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
removed duplicate id in topic template, closed #84, where opening a couple threads caused the reply window to load multiple times
This commit is contained in:
@@ -221,21 +221,23 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('#content').on('click', '.post_reply', function() {
|
||||
var selectionText = '',
|
||||
selection = window.getSelection() || document.getSelection();
|
||||
var reply_fn = function() {
|
||||
var selectionText = '',
|
||||
selection = window.getSelection() || document.getSelection();
|
||||
|
||||
if ($(selection.baseNode).parents('.post-content').length > 0) {
|
||||
var snippet = selection.toString();
|
||||
if (snippet.length > 0) selectionText = '> ' + snippet.replace(/\n/g, '\n> ');
|
||||
}
|
||||
if ($(selection.baseNode).parents('.post-content').length > 0) {
|
||||
var snippet = selection.toString();
|
||||
if (snippet.length > 0) selectionText = '> ' + snippet.replace(/\n/g, '\n> ');
|
||||
}
|
||||
|
||||
if (thread_state.locked !== '1') {
|
||||
require(['composer'], function(cmp) {
|
||||
cmp.push(tid, null, null, selectionText + '\n\n');
|
||||
});
|
||||
}
|
||||
});
|
||||
if (thread_state.locked !== '1') {
|
||||
require(['composer'], function(cmp) {
|
||||
cmp.push(tid, null, null, selectionText + '\n\n');
|
||||
});
|
||||
}
|
||||
};
|
||||
$('.post-container').on('click', '.post_reply', reply_fn);
|
||||
$('#post_reply').on('click', reply_fn);
|
||||
|
||||
$('.post-container').on('click', '.quote', function() {
|
||||
if (thread_state.locked !== '1') {
|
||||
|
||||
Reference in New Issue
Block a user