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

Commit

Permalink
Checkboxradio: Do not update twice upon input vclick
Browse files Browse the repository at this point in the history
(cherry picked from commit 805ff49)

Fixes gh-7378
  • Loading branch information
Gabriel Schulhof committed May 27, 2014
1 parent 7342344 commit 180f875
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/widgets/forms/checkboxradio.js
Expand Up @@ -135,7 +135,7 @@ $.widget( "mobile.checkboxradio", $.extend( {
// Adds checked attribute to checked input when keyboard is used
this.element.prop( "checked", this.element.is( ":checked" ) );
this._getInputSet().not( this.element ).prop( "checked", false );
this._updateAll();
this._updateAll( true );
},

_handleLabelVMouseOver: function( event ) {
Expand Down Expand Up @@ -225,13 +225,13 @@ $.widget( "mobile.checkboxradio", $.extend( {
return radios;
},

_updateAll: function() {
_updateAll: function( changeTriggered ) {
var self = this;

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

if ( this.checked || self.inputtype === "checkbox" ) {
if ( ( this.checked || self.inputtype === "checkbox" ) && !changeTriggered ) {
$this.trigger( "change" );
}
})
Expand Down

0 comments on commit 180f875

Please sign in to comment.