Skip to content

Commit

Permalink
Fix: Deprecated .blur()
Browse files Browse the repository at this point in the history
  • Loading branch information
Dernerd committed Dec 24, 2023
1 parent f845d21 commit 8b1935f
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion includes/admin/ui/chosen/chosen.jquery.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions includes/admin/ui/js/admin-product.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ jQuery(document).ready(function($) {
});

$(".select_attributes_filter a").on('focus', function(event) {
$(this).blur();
$(this).trigger("blur");
});

$('#mp_make_combinations, #publishing-action #publish').on('click', function(event) { //
Expand Down Expand Up @@ -301,7 +301,7 @@ jQuery(document).ready(function($) {
var len = $(replaceWith).val().length * 2; //has to be * 2 because how Opera counts carriage returns

$(replaceWith).selectRange(len, len);
replaceWith.blur(function() {
replaceWith.on("blur", function() {

if ($(this).val() != "") {

Expand Down Expand Up @@ -372,7 +372,7 @@ jQuery(document).ready(function($) {
});
$(".mp_inline_temp_value").on('keyup', function(e) {
if (e.keyCode == 13) {
$(this).blur();
$(this).trigger("blur");
}
e.preventDefault();
});
Expand All @@ -383,7 +383,7 @@ jQuery(document).ready(function($) {
var nextContainer = $(this).parent('th').next().next('td.field_editable');
nextContainer.find('.original_value').trigger('click');

$(this).blur();
$(this).trigger("blur");
}
});
$(".mp_inline_temp_value").on('keydown', function(e) {
Expand All @@ -394,7 +394,7 @@ jQuery(document).ready(function($) {
var nextContainer = $(this).parent().next('td');
nextContainer.find('.original_value').trigger('click');

$(this).blur();
$(this).trigger("blur");
}
});
$('#mp-product-price-inventory-variants-metabox').keydown(function(event) { //window
Expand Down
4 changes: 2 additions & 2 deletions includes/admin/ui/js/mp-dashboard-widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jQuery( document ).ready( function( $ ) {

$( replaceWith ).selectRange( len, len );

replaceWith.blur( function( ) {
replaceWith.on("blur", function( ) {

if ( $( this ).val( ) != "" ) {
connectWith.val( $( this ).val() ).trigger("change");
Expand Down Expand Up @@ -82,7 +82,7 @@ jQuery( document ).ready( function( $ ) {

$( ".mp_inline_temp_value" ).on( 'keyup', function( e ) {
if ( e.keyCode == 13 ) {
$( this ).blur( );
$( this ).trigger("blur");
}
e.preventDefault( );
} );
Expand Down
2 changes: 1 addition & 1 deletion includes/psource-metaboxes/ui/colorpicker/js/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
.index(this);
$(this)
.addClass('active')
.blur();
.trigger("blur");
$('div.tab')
.hide()
.eq(tabIndex)
Expand Down
4 changes: 2 additions & 2 deletions includes/psource-metaboxes/ui/select2/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ the specific language governing permissions and limitations under the Apache Lic
// ValidationEngine ignores the change event and listens instead to blur
// so here we trigger the blur event manually if so desired
if (this.opts.blurOnChange)
this.opts.element.blur();
this.opts.element.trigger("blur");
},

//abstract
Expand Down Expand Up @@ -1814,7 +1814,7 @@ the specific language governing permissions and limitations under the Apache Lic
this.close();
this.container.removeClass("select2-container-active");
// synonymous to .is(':focus'), which is available in jquery >= 1.6
if (this.search[0] === document.activeElement) { this.search.blur(); }
if (this.search[0] === document.activeElement) { this.search.trigger("blur"); }
this.clearSearch();
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
},
Expand Down
2 changes: 1 addition & 1 deletion includes/psource-metaboxes/ui/select2/select2.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Halte Dich mit unserem [Newsletter](https://n3rds.work/webmasterservice-n3rdswor
* Fix: Deprecated .hover()
* Fix: Deprecated .click()
* Fix: Deprecated .change()
* Fix: Deprecated .blur()

= 3.5.6 =

Expand Down
2 changes: 1 addition & 1 deletion ui/colorpicker/js/jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -5427,7 +5427,7 @@ jQuery.event = {
blur: {
trigger: function() {
if ( this === safeActiveElement() && this.blur ) {
this.blur();
this.trigger("blur");
return false;
}
},
Expand Down
2 changes: 1 addition & 1 deletion ui/colorpicker/js/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
.index(this);
$(this)
.addClass('active')
.blur();
.trigger("blur");
$('div.tab')
.hide()
.eq(tabIndex)
Expand Down
4 changes: 2 additions & 2 deletions ui/select2/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ the specific language governing permissions and limitations under the Apache Lic
// ValidationEngine ignores the change event and listens instead to blur
// so here we trigger the blur event manually if so desired
if (this.opts.blurOnChange)
this.opts.element.blur();
this.opts.element.trigger("blur");
},

//abstract
Expand Down Expand Up @@ -1814,7 +1814,7 @@ the specific language governing permissions and limitations under the Apache Lic
this.close();
this.container.removeClass("select2-container-active");
// synonymous to .is(':focus'), which is available in jquery >= 1.6
if (this.search[0] === document.activeElement) { this.search.blur(); }
if (this.search[0] === document.activeElement) { this.search.trigger("blur"); }
this.clearSearch();
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
},
Expand Down
2 changes: 1 addition & 1 deletion ui/select2/select2.min.js

Large diffs are not rendered by default.

0 comments on commit 8b1935f

Please sign in to comment.