Authored by gaoqiang xu

[bug fix] 修复webview在zoom的时候,点击区域坐标不正确,不能正确响应事件的问题

reviewed by 孙凯
... ... @@ -248,7 +248,12 @@
- (void)hanldeTapGesture:(UITapGestureRecognizer *)gesture {
if (gesture == _tapGesture) {
CGFloat displayWidth = [[self.webView stringByEvaluatingJavaScriptFromString:@"window.innerWidth"] floatValue];
CGFloat scale = self.webView.frame.size.width / displayWidth;
CGPoint touchPoint = [gesture locationInView:self.webView];
// 如果webview是zoom状态,把对应的比例除去
touchPoint.x /= scale;
touchPoint.y /= scale;
BOOL validArea = YES;
BOOL validIdArea = YES;
... ...