JS: in event callbacks replace the very outdated return false with preventDefault().
Props adamsilverstein. Fixes #18590. Built from https://develop.svn.wordpress.org/trunk@34977 git-svn-id: http://core.svn.wordpress.org/trunk@34942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -284,13 +284,13 @@ setCommentsList = function() {
|
||||
a.attr('class', 'vim-z vim-destructive');
|
||||
$('.avatar', el).first().clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside');
|
||||
|
||||
a.click(function(){
|
||||
a.click(function( e ){
|
||||
e.preventDefault();
|
||||
list.wpList.del(this);
|
||||
$('#undo-' + id).css( {backgroundColor:'#ceb'} ).fadeOut(350, function(){
|
||||
$(this).remove();
|
||||
$('#comment-' + id).css('backgroundColor', '').fadeIn(300, function(){ $(this).show(); });
|
||||
});
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -854,7 +854,10 @@ $(document).ready(function(){
|
||||
|
||||
setCommentsList();
|
||||
commentReply.init();
|
||||
$(document).delegate('span.delete a.delete', 'click', function(){return false;});
|
||||
|
||||
$(document).on( 'click', 'span.delete a.delete', function( e ) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
if ( typeof $.table_hotkeys != 'undefined' ) {
|
||||
make_hotkeys_redirect = function(which) {
|
||||
|
||||
Reference in New Issue
Block a user