LoginSignup
2
0

More than 3 years have passed since last update.

iPad Safari PointerDown調査

Last updated at Posted at 2019-09-11

iOS12では、PointerDownを拾えないため、タッチとペンの判別がかなり辛い。

iPad OSのSafariでようやくPointerEvent系が実装されるので、動作を確認した。

pointerdown touchstart mousedown のいずれかをセットした場合

pointerdownの中身は event.pointerType

OS 操作 pointerdown touchstart mousedown
MAC Chrome マウス mouse -
iPad iOS 12 タッチ -
iPad iOS 12 Applie Pencil - -
iPad iPad-OS 13 beta2 タッチ touch
iPad iPad-OS 13 beta2 Applie Pencil pen -

pointerdown / touchstart / mousedown を全部セットした場合(数値は呼ばれた順番)

OS 操作 pointerdown touchstart mousedown
MAC Chrome マウス 1 - 2
iPad iOS 12 タッチ - 1 2
iPad iOS 12 Applie Pencil - 1 -
iPad iPad-OS 13 beta2 タッチ 1 2 3
iPad iPad-OS 13 beta2 Applie Pencil 1 2 -

その他

指でスクロール・apple pencilではスクロールさせない


トップ要素(v-on:touchmove.scroll='scrolling')


scrolling(event: TouchEvent) {
  const t = event.touches[0];
  if (t && t.touchType == "stylus") event.preventDefault();
}
2
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
2
0