Skip to content

Form: Rename from .form() to ._form() since its not for public use #1760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/unit/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ QUnit.test( "Labels", function( assert ) {
QUnit.test( name + this.id.replace( /_/g, " " ), function( assert ) {
var ready = assert.async();
assert.expect( 1 );
var form = input.form();
var form = input._form();

// If input has a form the value should reset to "" if not it should be "changed"
var value = form.length ? "" : "changed";
Expand Down
2 changes: 1 addition & 1 deletion ui/form-reset-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ return $.ui.formResetMixin = {
},

_bindFormResetHandler: function() {
this.form = this.element.form();
this.form = this.element._form();
if ( !this.form.length ) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion ui/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// Support: IE8 Only
// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
// with a string, so we need to find the proper form.
return $.fn.form = function() {
return $.fn._form = function() {
return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
};

Expand Down
2 changes: 1 addition & 1 deletion ui/widgets/checkboxradio.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {

// Not inside a form, check all inputs that also are not inside a form
group = $( nameSelector ).filter( function() {
return $( this ).form().length === 0;
return $( this )._form().length === 0;
} );
}

Expand Down