[PWA] Disable Text Selection and Touch Callouts in a PWA on iOS

Posted Answer1215

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[PWA] Disable Text Selection and Touch Callouts in a PWA on iOS相关的知识,希望对你有一定的参考价值。

Because an installed PWA is really just a web app running in a browser, there are some browser behaviors that we may not want in our app, if we‘re going for a more "native" feel.

We‘ll first disable the ability to select text in our app by setting the css user-select options to none.

Then, we‘ll disable the ios long-press "callout" menu by setting -webkit-touch-callout to none.

 

App.css

body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  -webkit-touch-callout: none;
}

 

以上是关于[PWA] Disable Text Selection and Touch Callouts in a PWA on iOS的主要内容,如果未能解决你的问题,请参考以下文章

text PWA

text PWA资源

form中的input的redonly和disable区别

PWA - beforeinstallprompt 未调用

text vino disable en

text vino disable en