forked from GNUsocial/gnu-social
Tweaks for closing
This commit is contained in:
parent
4e1ce4e5bb
commit
d107164aec
@ -1315,12 +1315,11 @@ var SN = { // StatusNet
|
|||||||
$('body').bind('click', function(e) {
|
$('body').bind('click', function(e) {
|
||||||
var openReplies = $('li.notice-reply');
|
var openReplies = $('li.notice-reply');
|
||||||
if (openReplies.length > 0) {
|
if (openReplies.length > 0) {
|
||||||
var target = $(e.target).closest('li.notice-reply');
|
var target = $(e.target);
|
||||||
if (target.length == 0) {
|
|
||||||
// There are inline replies open, and we
|
|
||||||
// clicked outside of one...
|
|
||||||
openReplies.each(function() {
|
openReplies.each(function() {
|
||||||
|
// Did we click outside this one?
|
||||||
var replyItem = $(this);
|
var replyItem = $(this);
|
||||||
|
if (replyItem.has(e.target).length == 0) {
|
||||||
var textarea = replyItem.find('.notice_data-text:first');
|
var textarea = replyItem.find('.notice_data-text:first');
|
||||||
var cur = $.trim(textarea.val());
|
var cur = $.trim(textarea.val());
|
||||||
// Only close if there's been no edit.
|
// Only close if there's been no edit.
|
||||||
@ -1329,8 +1328,8 @@ var SN = { // StatusNet
|
|||||||
replyItem.remove();
|
replyItem.remove();
|
||||||
SN.U.NoticeInlineReplyPlaceholder(parentNotice);
|
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