Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 添加支持apple mobile web app的功能可停止识别SVG触摸_Javascript_Angularjs_Svg_Ios8_Mobile Safari - Fatal编程技术网

Javascript 添加支持apple mobile web app的功能可停止识别SVG触摸

Javascript 添加支持apple mobile web app的功能可停止识别SVG触摸,javascript,angularjs,svg,ios8,mobile-safari,Javascript,Angularjs,Svg,Ios8,Mobile Safari,我正在尝试向SVG添加触摸功能 我使用类似jQuery的选择器识别触摸事件。 (我实际上使用的是angular JQLite-angular.element()): 在我的桌面和移动Safari中,没有问题。触摸被正确识别。 当保存为书签时,它也会正确响应,但当我包括: <meta name="apple-mobile-web-app-capable" content="yes" /> 在我的标题中,并保存到主屏幕。。触摸片没有反应 我想知道是否有人知道这件事的根本原因或者

我正在尝试向SVG添加触摸功能

我使用类似jQuery的选择器识别触摸事件。 (我实际上使用的是angular JQLite-angular.element()):

在我的桌面和移动Safari中,没有问题。触摸被正确识别。 当保存为书签时,它也会正确响应,但当我包括:

  <meta name="apple-mobile-web-app-capable" content="yes" />

在我的标题中,并保存到主屏幕。。触摸片没有反应

我想知道是否有人知道这件事的根本原因或者有解决办法?
我使用Angular 1.2.27和iOS 8作为参考,我通过在SVG本身中嵌入ng点击来解决这个问题


这可能是因为angulars JQLite实现了click/moousedown/touchstart,或者可能不支持与ng click相同的触摸事件。

将以下几行添加到css文件中

svg {
    pointer-events: none;
}
现在应该可以了

svg {
    pointer-events: none;
}