Permalink
Browse files

restore check that view is within viewport in touchPointIfInsideWindow

  • Loading branch information...
1 parent a11e99b commit 2ef52979dbe8d63bb62978d4572770c51a554a58 @moredip committed Aug 17, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/UIView+PublicAutomation.m
@@ -19,6 +19,11 @@
@implementation UIView(PublicAutomation)
- (BOOL) touchPointIfInsideWindow:(CGPoint)point{
+ CGPoint pointInWindowCoords = [self.window convertPoint:point fromView:self];
+ if( !CGRectContainsPoint(self.window.bounds, pointInWindowCoords) ){
+ return NO;
+ }
+
[UIAutomationBridge tapView:self atPoint:point];
return YES;
}

0 comments on commit 2ef5297

Please sign in to comment.