某些部分的Vue文件在iOS >16.4上不起作用的原因是什么?

huangapple go评论48阅读模式
英文:

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 16.4和iOS 16.4.1上运行良好。

它在旧版本的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 :

&lt;div class=&quot;temps&quot; :class=&quot;{inactive: !regulation_hot_or_cold}&quot;&gt;
   &lt;div class=&quot;temp&quot;&gt;
         &lt;label class=&quot;form-checkbox&quot; :class=&quot;{disabled: !is_zone_off || !can_change_setpoints}&quot;&gt;
            &lt;input type=&quot;radio&quot; :value=&quot;1&quot; v-model=&quot;mutated_t1_t2&quot; :disabled=&quot;!is_zone_off || !can_change_setpoints&quot;&gt;
            &lt;span&gt;First&lt;/span&gt;
         &lt;/label&gt;
         &lt;div class=&quot;input&quot; :class=&quot;{disabled: !can_change_setpoints}&quot;&gt;
            &lt;i class=&quot;icon-minus&quot; @click.prevent=&quot;incrementCurrentSetpoint(-0.5, 1)&quot;&gt;&lt;/i&gt;
            &lt;span class=&quot;value&quot;&gt;{{ currentSetpoint(1) }}{{ this.regulation_hot_or_cold ? &#39;&#176;C&#39; : &#39;&#39; }}&lt;/span&gt;
            &lt;i class=&quot;icon-plus&quot; @click.prevent=&quot;incrementCurrentSetpoint(0.5, 1)&quot;&gt;&lt;/i&gt;
         &lt;/div&gt;
   &lt;/div&gt;
   &lt;div class=&quot;temp&quot;&gt;
         &lt;label class=&quot;form-checkbox&quot; :class=&quot;{disabled: !is_zone_off || !can_change_setpoints}&quot;&gt;
            &lt;input type=&quot;radio&quot; :value=&quot;2&quot; v-model=&quot;mutated_t1_t2&quot; :disabled=&quot;!is_zone_off || !can_change_setpoints&quot;&gt;
            &lt;span&gt;Second&lt;/span&gt;
         &lt;/label&gt;
         &lt;div class=&quot;input&quot; :class=&quot;{disabled: !can_change_setpoints}&quot;&gt;
            &lt;i class=&quot;icon-minus&quot; @click.prevent=&quot;incrementCurrentSetpoint(-0.5, 2)&quot;&gt;&lt;/i&gt;
            &lt;span class=&quot;value&quot;&gt;{{ currentSetpoint(2) }}{{ this.regulation_hot_or_cold ? &#39;&#176;C&#39; : &#39;&#39; }}&lt;/span&gt;
            &lt;i class=&quot;icon-plus&quot; @click.prevent=&quot;incrementCurrentSetpoint(0.5, 2)&quot;&gt;&lt;/i&gt;
         &lt;/div&gt;
   &lt;/div&gt;
&lt;/div&gt;

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 !

huangapple
  • 本文由 发表于 2023年4月17日 22:35:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76036309.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定