Check that current changes can be lost before editing another comment.
When replying to or editing a comment, double-clicking another comment will open it in quick edit and changes to the current comment are lost. Props pareshradadiya, chriscct7. Fixes #21845. Built from https://develop.svn.wordpress.org/trunk@32857 git-svn-id: http://core.svn.wordpress.org/trunk@32828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -313,8 +313,9 @@ commentReply = {
|
||||
},
|
||||
|
||||
toggle : function(el) {
|
||||
if ( $(el).css('display') != 'none' )
|
||||
$(el).find('a.vim-q').click();
|
||||
if ( 'none' !== $( el ).css( 'display' ) && ( $( '#replyrow' ).parent().is('#com-reply') || window.confirm( adminCommentsL10n.warnQuickEdit ) ) ) {
|
||||
$( el ).find( 'a.vim-q' ).click();
|
||||
}
|
||||
},
|
||||
|
||||
revert : function() {
|
||||
|
||||
Reference in New Issue
Block a user