Skip to content

Commit 6350f43

Browse files
committed
MC-41897: Fix jQuery.fn.bind()
- Change deprecated function bind and unbind
1 parent d7b0245 commit 6350f43

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,10 @@ define([
431431
tableBody = $(),
432432
activePanel = $();
433433

434-
$('#frontend_input').bind('change', function () {
434+
$('#frontend_input').on('change', function () {
435435
swatchProductAttributes.bindAttributeInputType();
436436
});
437-
$('#is_filterable').bind('change', function () {
437+
$('#is_filterable').on('change', function () {
438438
swatchProductAttributes.switchIsFilterable();
439439
});
440440

app/code/Magento/Ui/view/base/web/js/grid/resize.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ define([
445445
cfg.depResizeElem.model.width = $(cfg.depResizeElem.elems[0]).outerWidth();
446446
body.addClass(this.inResizeClass);
447447
body.bind('mousemove', this.mousemoveHandler);
448-
$(window).bind('mouseup', this.mouseupHandler);
448+
$(window).on('mouseup', this.mouseupHandler);
449449
},
450450

451451
/**
@@ -529,7 +529,7 @@ define([
529529

530530
body.removeClass(this.inResizeClass);
531531
body.unbind('mousemove', this.mousemoveHandler);
532-
$(window).unbind('mouseup', this.mouseupHandler);
532+
$(window).off('mouseup', this.mouseupHandler);
533533
},
534534

535535
/**

0 commit comments

Comments
 (0)