Permalink
Browse files

removing the parent proxy, it is unneeded, the normal flow of events …

…takes care of that.
  • Loading branch information...
1 parent c8f74e9 commit 278a28a7001c088248c15a5df129b4f455f51d60 @stomlinson stomlinson committed Jan 17, 2011
Showing with 1 addition and 24 deletions.
  1. +1 −6 src/mouseEventProxy.js
  2. +0 −18 tests/spec/mouseEventProxy_spec.js
View
@@ -50,12 +50,7 @@ window.MouseEventProxy = (function() {
this.target = $( config.target );
if( config.proxyTo ) {
- if( config.proxyTo == 'parent' ) {
- this.proxyTarget = this.target.parent();
- }
- else {
- this.proxyTarget = $( config.proxyTo );
- }
+ this.proxyTarget = $( config.proxyTo );
}
this.handler = function( event ) {
@@ -122,24 +122,6 @@ describe( "MouseEventProxy", function() {
expect( otherMouseOut ).toBe( true );
} );
- it( 'can proxy to the parent', function() {
- proxy = new MouseEventProxy();
- proxy.init( {
- target: top,
- events: [ 'mouseout' ],
- proxyTo: 'parent'
- } );
-
- var parentMouseOut = false;
- top.parent().bind( 'mouseout', function() {
- parentMouseOut = true;
- } );
-
- sendEvent( top, 'mouseout' );
-
- expect( parentMouseOut ).toBe( true );
- } );
-
it( 'provides the jQuery plugin', function() {
expect( typeof( $.fn.proxyMouseEvents ) == 'function' ).toBe( true );
} );

0 comments on commit 278a28a

Please sign in to comment.