iOS touch enter/exit fix for BUttonGroup

This commit is contained in:
Mark Salsbery 2014-04-23 08:38:55 -07:00
parent d9dfd0a435
commit bd52f38788

View File

@ -103,9 +103,17 @@ $.ButtonGroup = function( options ) {
} }
} }
}, },
pressHandler: function ( event ) {
if ( event.pointerType === 'touch' && !$.MouseTracker.haveTouchEnter ) {
var i;
for ( i = 0; i < _this.buttons.length; i++ ) {
_this.buttons[ i ].notifyGroupEnter();
}
}
},
releaseHandler: function ( event ) { releaseHandler: function ( event ) {
var i; var i;
if ( !event.insideElementReleased ) { if ( !event.insideElementReleased || ( event.pointerType === 'touch' && !$.MouseTracker.haveTouchEnter ) ) {
for ( i = 0; i < _this.buttons.length; i++ ) { for ( i = 0; i < _this.buttons.length; i++ ) {
_this.buttons[ i ].notifyGroupExit(); _this.buttons[ i ].notifyGroupExit();
} }