我创建了一个有角度的应用程序,它充当iOS社交应用程序的"反弹"页面,该应用程序处于公测阶段。
- 用户可以将他们的个人资料作为网站链接在彼此之间共享
- 如果在iOS设备上打开页面,并且安装了应用程序,则会使用应用程序的URL方案打开应用程序。否则会重定向到应用商店
- 对于所有其他设备,android,桌面等,它只是呈现一个简单的信息页面
问题:
在Safari的一个实例中,没有呈现页面的两个元素。
缺少元素:
- 配置文件名称下方的"仪器"标签不会出现
- 版权、隐私以及条款和条件不显示
在Safari的所有其他实例上,也包括Chrome和Firefox,它正确显示如下:
- 该站点使用Angular+Bootstrap实现
缺少仪器标签的部分的页面来源是:
<div ng-show="vm.loaded">
<div class="row">
<div class="col-sm-4 col-sm-offset-4 profile-container">
<div class="row">
<div class="col-xs-12" style="min-width: 300px !important;">
<div class="card hovercard">
<div class="photo-container">
</div>
<div class="useravatar">
<img ng-src="{{vm.profile.coverPhotoURL}}" vpr-load="vm.onImageLoaded()">
</div>
</div>
</div>
<div class="col-xs-12 text-center" style="margin-top: -10px">
<span class="profile-title">{{vm.titleText()}}</span>
</div>
<div class="col-xs-12 text-center" style="margin-top: 8px">
<span class="profile-sub-title">{{vm.instruments()}}</span>
</div>
<div class="col-xs-12 text-center" style="padding-bottom: 20px">
<span class="profile-genres">{{vm.genres()}}</span>
</div>
</div>
</div>
</div>
页脚如下:
<footer class="vFooter hidden-xs">
<div class="container">
<div class="row">
<div class="col col-xs-6 text-center" style="height: 80px">
<div class="vertical-center">
<p class="copyright vertical-center" style="margin-top: 20px; margin-bottom: 20px">
<span class="text-nowrap">© Vampr Pty Ltd 2016 | <vpr-link-bar></vpr-link-bar></span>
</p>
</div>
</div>
(etc, etc)
(一些关闭的<div>
标签没有显示在上面的源代码片段中)
问题:
如果无法访问出现问题的机器,我如何调试和更正问题?
我在Safari的另一个实例上发现了类似的问题,似乎是由AdBlock引起的——禁用它会使元素正确显示。然而,有问题的元素曾经是不同的——社交媒体按钮。
问题似乎是由一个未加转义的&符号'&'引起的HTML源中的字符。解决了这个问题。我不知道为什么这个问题只发生在Safari的一个特定实例上,而其他实例很多。