Skip to content

Commit 0627eb3

Browse files
committed
Form: Rename from .form() to ._form() since its not for public use
Fixes #15074 Closes jquerygh-1760
1 parent 87eab46 commit 0627eb3

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tests/unit/core/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ QUnit.test( "Labels", function( assert ) {
180180
QUnit.test( name + this.id.replace( /_/g, " " ), function( assert ) {
181181
var ready = assert.async();
182182
assert.expect( 1 );
183-
var form = input.form();
183+
var form = input._form();
184184

185185
// If input has a form the value should reset to "" if not it should be "changed"
186186
var value = form.length ? "" : "changed";

ui/form-reset-mixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ return $.ui.formResetMixin = {
4242
},
4343

4444
_bindFormResetHandler: function() {
45-
this.form = this.element.form();
45+
this.form = this.element._form();
4646
if ( !this.form.length ) {
4747
return;
4848
}

ui/form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Support: IE8 Only
1414
// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
1515
// with a string, so we need to find the proper form.
16-
return $.fn.form = function() {
16+
return $.fn._form = function() {
1717
return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
1818
};
1919

ui/widgets/checkboxradio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
161161

162162
// Not inside a form, check all inputs that also are not inside a form
163163
group = $( nameSelector ).filter( function() {
164-
return $( this ).form().length === 0;
164+
return $( this )._form().length === 0;
165165
} );
166166
}
167167

0 commit comments

Comments
 (0)