Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 180f875

Browse files
author
Gabriel Schulhof
committed
Checkboxradio: Do not update twice upon input vclick
(cherry picked from commit 805ff49) Fixes gh-7378
1 parent 7342344 commit 180f875

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/widgets/forms/checkboxradio.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ $.widget( "mobile.checkboxradio", $.extend( {
135135
// Adds checked attribute to checked input when keyboard is used
136136
this.element.prop( "checked", this.element.is( ":checked" ) );
137137
this._getInputSet().not( this.element ).prop( "checked", false );
138-
this._updateAll();
138+
this._updateAll( true );
139139
},
140140

141141
_handleLabelVMouseOver: function( event ) {
@@ -225,13 +225,13 @@ $.widget( "mobile.checkboxradio", $.extend( {
225225
return radios;
226226
},
227227

228-
_updateAll: function() {
228+
_updateAll: function( changeTriggered ) {
229229
var self = this;
230230

231231
this._getInputSet().each( function() {
232232
var $this = $( this );
233233

234-
if ( this.checked || self.inputtype === "checkbox" ) {
234+
if ( ( this.checked || self.inputtype === "checkbox" ) && !changeTriggered ) {
235235
$this.trigger( "change" );
236236
}
237237
})

0 commit comments

Comments
 (0)