英文:
Why some part of my vue file doesn't work with iOS >16.4?
问题
我有一个在浏览器和最新的Android版本上运行良好的网站,但在最新的iOS版本(>16.4)上不起作用。我必须强调它在iOS 16.3上运行良好。
我知道iOS 16.4存在很多问题,这就是为什么我等待iOS 16.4.1来看他们是否解决了这个问题,但仍然不起作用。
我的网站使用laravel 5.6和vuejs 2.5。
问题似乎是页面上的整个区域被禁用了。我有两个非常相似的不同区域之一似乎被禁用了,在iOS 16.4上无法单击元素。
以下是代码部分:
<div class="temps" :class="{inactive: !regulation_hot_or_cold}">
<div class="temp">
<label class="form-checkbox" :class="{disabled: !is_zone_off || !can_change_setpoints}">
<input type="radio" :value="1" v-model="mutated_t1_t2" :disabled="!is_zone_off || !can_change_setpoints">
<span>First</span>
</label>
<div class="input" :class="{disabled: !can_change_setpoints}">
<i class="icon-minus" @click.prevent="incrementCurrentSetpoint(-0.5, 1)"></i>
<span class="value">{{ currentSetpoint(1) }}{{ this.regulation_hot_or_cold ? '°C' : '' }}</span>
<i class="icon-plus" @click.prevent="incrementCurrentSetpoint(0.5, 1)"></i>
</div>
</div>
<div class="temp">
<label class="form-checkbox" :class="{disabled: !is_zone_off || !can_change_setpoints}">
<input type="radio" :value="2" v-model="mutated_t1_t2" :disabled="!is_zone_off || !can_change_setpoints">
<span>Second</span>
</label>
<div class="input" :class="{disabled: !can_change_setpoints}">
<i class="icon-minus" @click.prevent="incrementCurrentSetpoint(-0.5, 2)"></i>
<span class="value">{{ currentSetpoint(2) }}{{ this.regulation_hot_or_cold ? '°C' : '' }}</span>
<i class="icon-plus" @click.prevent="incrementCurrentSetpoint(0.5, 2)"></i>
</div>
</div>
</div>
第一个带有"class="temp""的
它在旧版本的iOS上,如iOS 16.3上运行良好。
有人有什么想法可以是问题的原因吗?
非常感谢。
编辑
我尝试过:
- 将laravel版本从5.6升级到8.0版本 = 没有结果
- 为应该可点击的元素(即元素)添加cursor:pointer = 没有结果
英文:
I have a website that works fine on browsers, last Android version but not on the last iOS version (>16.4). I have to precise that it works fine on iOS 16.3.
I know that iOS 16.4 meets a lots of issues and that's why I've waited for iOS 16.4.1 to see if they resolve this bug but it still doesn't work.
My website use laravel 5.6 and vuejs 2.5.
The problem sounds like an entire area of the page which is disabled. I have two different area that are very similar and one of them is like disabled, we cannot click on the element on iOS 16.4.
Here is the code :
<div class="temps" :class="{inactive: !regulation_hot_or_cold}">
<div class="temp">
<label class="form-checkbox" :class="{disabled: !is_zone_off || !can_change_setpoints}">
<input type="radio" :value="1" v-model="mutated_t1_t2" :disabled="!is_zone_off || !can_change_setpoints">
<span>First</span>
</label>
<div class="input" :class="{disabled: !can_change_setpoints}">
<i class="icon-minus" @click.prevent="incrementCurrentSetpoint(-0.5, 1)"></i>
<span class="value">{{ currentSetpoint(1) }}{{ this.regulation_hot_or_cold ? '°C' : '' }}</span>
<i class="icon-plus" @click.prevent="incrementCurrentSetpoint(0.5, 1)"></i>
</div>
</div>
<div class="temp">
<label class="form-checkbox" :class="{disabled: !is_zone_off || !can_change_setpoints}">
<input type="radio" :value="2" v-model="mutated_t1_t2" :disabled="!is_zone_off || !can_change_setpoints">
<span>Second</span>
</label>
<div class="input" :class="{disabled: !can_change_setpoints}">
<i class="icon-minus" @click.prevent="incrementCurrentSetpoint(-0.5, 2)"></i>
<span class="value">{{ currentSetpoint(2) }}{{ this.regulation_hot_or_cold ? '°C' : '' }}</span>
<i class="icon-plus" @click.prevent="incrementCurrentSetpoint(0.5, 2)"></i>
</div>
</div>
</div>
The first div with "temp" class doesn't work but the second one works fine (on iOS 16.4 and iOS 16.4.1).
It works on iOS older versions like iOS 16.3.
Does anyone have an idea of what can be the problem?
Thanks a lot.
EDIT
I tried :
- Upgrade laravel version from 5.6 to 8.0 version = no results
- Add cursor:pointer to an element that should be clickable (i elements) = no results
答案1
得分: 0
我终于能够通过将iPhone插入Mac并使用Safari检查器来进行测试。
检查器中没有错误,但它让我看到我的“flipCard”的整个左侧部分不再工作。
所以我最终发现问题出在transform属性上,多亏了这个主题:https://stackoverflow.com/questions/60797033/why-cant-i-click-the-left-side-of-the-link-on-this-css-flip-card-in-chrome
我将这个:
transform: rotateY(180deg);
改成了:
transform: rotateY(180deg) translateZ(1px);
现在它正常工作了。
所以这与vuejs无关...
唯一的问题是,我不明白为什么这个问题会在iOS 16.4版本之后出现,而之前没有。
希望对一些人有所帮助!
英文:
I was finally able to test via the safari inspector by plugging an iphone into a mac.
No error in the inspector but it allowed me to see that it was the entire left part of the back of my "flipCard" that was no longer working.
So I finally found that it was the transform property that was at fault thanks to this topic : https://stackoverflow.com/questions/60797033/why-cant-i-click-the-left-side-of-the-link-on-this-css-flip-card-in-chrome
I changed this :
transform: rotateY(180deg);
into this
transform: rotateY(180deg) translateZ(1px);
and now it works fine.
So it had nothing to do with vuejs...
The only thing is that I don't understand why this problem appeared since version 16.4 of iOS and not before.
Hope this helps some people !
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
- ios16.4
- laravel-5
- vuejs2
评论