Skip to content

Commit

Permalink
Fix #13: click current option item should not fire onchange event.
Browse files Browse the repository at this point in the history
  • Loading branch information
mytharcher committed Jul 20, 2012
1 parent 566b70e commit 9d92174
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/esui/Select.js
Expand Up @@ -488,15 +488,15 @@ esui.Select.prototype = {
* @param {HTMLElement} item 选项
*/
_itemClickHandler: function ( item ) {
var index = item.getAttribute( 'index' );
var index = parseInt( item.getAttribute( 'index' ), 10 );
var disabled = item.getAttribute( 'dis' );

if ( disabled == 1 ) {
return;
}

this.hideLayer();
this.setSelectedIndex( parseInt( index, 10 ), true );
this.setSelectedIndex( index, index != this.selectedIndex );
},

/**
Expand Down

0 comments on commit 9d92174

Please sign in to comment.