Skip to content

Commit

Permalink
Fix: Deprecated .select()
Browse files Browse the repository at this point in the history
  • Loading branch information
Dernerd committed Dec 24, 2023
1 parent 5d77636 commit 542f708
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion includes/admin/ui/js/admin-product.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ jQuery(document).ready(function($) {
range.collapse(true);
range.moveEnd('character', end);
range.moveStart('character', start);
range.select();
range.trigger("select");
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/ui/js/mp-dashboard-widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jQuery( document ).ready( function( $ ) {
range.collapse( true );
range.moveEnd( 'character', end );
range.moveStart( 'character', start );
range.select();
range.trigger("select");
}
} );
};
Expand Down
10 changes: 5 additions & 5 deletions includes/psource-metaboxes/ui/select2/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ the specific language governing permissions and limitations under the Apache Lic
else if (el.createTextRange) {
range = el.createTextRange();
range.collapse(false);
range.select();
range.trigger("select");
}
}
}, 0);
Expand Down Expand Up @@ -1977,7 +1977,7 @@ the specific language governing permissions and limitations under the Apache Lic
if (el.createTextRange) {
range = el.createTextRange();
range.collapse(false);
range.select();
range.trigger("select");
} else if (el.setSelectionRange) {
len = this.search.val().length;
el.setSelectionRange(len, len);
Expand All @@ -1989,7 +1989,7 @@ the specific language governing permissions and limitations under the Apache Lic
if(this.search.val() === "") {
if(this.nextSearchTerm != undefined){
this.search.val(this.nextSearchTerm);
this.search.select();
this.search.trigger("select");
}
}

Expand Down Expand Up @@ -2887,7 +2887,7 @@ the specific language governing permissions and limitations under the Apache Lic
if(this.search.val() === "") {
if(this.nextSearchTerm != undefined){
this.search.val(this.nextSearchTerm);
this.search.select();
this.search.trigger("select");
}
}

Expand Down Expand Up @@ -2981,7 +2981,7 @@ the specific language governing permissions and limitations under the Apache Lic
if(this.nextSearchTerm != undefined){
this.search.val(this.nextSearchTerm);
this.updateResults();
this.search.select();
this.search.trigger("select");
}
}
this.positionDropdown();
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 @@ -56,6 +56,7 @@ Halte Dich mit unserem [Newsletter](https://n3rds.work/webmasterservice-n3rdswor
* Fix: Deprecated .unbind()
* Fix: Deprecated .submit()
* Fix: Deprecated .size()
* Fix: Deprecated .select()

= 3.5.6 =

Expand Down
10 changes: 5 additions & 5 deletions ui/select2/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ the specific language governing permissions and limitations under the Apache Lic
else if (el.createTextRange) {
range = el.createTextRange();
range.collapse(false);
range.select();
range.trigger("select");
}
}
}, 0);
Expand Down Expand Up @@ -1977,7 +1977,7 @@ the specific language governing permissions and limitations under the Apache Lic
if (el.createTextRange) {
range = el.createTextRange();
range.collapse(false);
range.select();
range.trigger("select");
} else if (el.setSelectionRange) {
len = this.search.val().length;
el.setSelectionRange(len, len);
Expand All @@ -1989,7 +1989,7 @@ the specific language governing permissions and limitations under the Apache Lic
if(this.search.val() === "") {
if(this.nextSearchTerm != undefined){
this.search.val(this.nextSearchTerm);
this.search.select();
this.search.trigger("select");
}
}

Expand Down Expand Up @@ -2887,7 +2887,7 @@ the specific language governing permissions and limitations under the Apache Lic
if(this.search.val() === "") {
if(this.nextSearchTerm != undefined){
this.search.val(this.nextSearchTerm);
this.search.select();
this.search.trigger("select");
}
}

Expand Down Expand Up @@ -2981,7 +2981,7 @@ the specific language governing permissions and limitations under the Apache Lic
if(this.nextSearchTerm != undefined){
this.search.val(this.nextSearchTerm);
this.updateResults();
this.search.select();
this.search.trigger("select");
}
}
this.positionDropdown();
Expand Down
2 changes: 1 addition & 1 deletion ui/select2/select2.min.js

Large diffs are not rendered by default.

0 comments on commit 542f708

Please sign in to comment.