Remove inline reply forms on click-away if they have initial text as well as if empty (plus whitespace stripping)
This commit is contained in:
parent
acca8a24b4
commit
4e1ce4e5bb
@ -1321,8 +1321,10 @@ var SN = { // StatusNet
|
||||
// clicked outside of one...
|
||||
openReplies.each(function() {
|
||||
var replyItem = $(this);
|
||||
var textarea = replyItem.find('.notice_data-text:first');
|
||||
var cur = $.trim(textarea.val());
|
||||
// Only close if there's been no edit.
|
||||
if (replyItem.find('.notice_data-text:first').val() == '') {
|
||||
if (cur == '' || cur == textarea.data('initialText')) {
|
||||
var parentNotice = replyItem.closest('li.notice');
|
||||
replyItem.remove();
|
||||
SN.U.NoticeInlineReplyPlaceholder(parentNotice);
|
||||
|
2
js/util.min.js
vendored
2
js/util.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user