1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

CSSのtouch-actionプロパティでハマった話(画像版)

Last updated at Posted at 2024-03-16

タイトルのパクリ元

問題のコード

body {
  touch-action: manipulation;
}

何が起こったか

imgタグの画像を長押ししても「画像をダウンロードする」のやつが出ない!
スマホのブラウザの仕様なのかな~。なんて馬鹿なことを考えて無駄にハマってしまった。

冷静に考えたらタッチアクションを制限してるんだから当たり前だろって話。

そんだけ。

修正方法

body {
  touch-action: manipulation;
}

+ img {
+   touch-action: auto;
+ }
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?