The active pseudo class of the mobile button is invalid

long pressing the press event will cause the browser to pop up the menu. Apple"s can use: please enter the code-webkit-touch-callout: none; to disable it, but Android can"t. The prohibition of pop-up can only be controlled with j and bold text s:
window.ontouchstart = function (e) {

e.preventDefault(); 

};
in this way: active is invalid. Is there any way to guarantee the button: active, can also prohibit Android browsers from pressing the pop-up menu?

Mar.17,2021

document.body.addEventListener('contextmenu', function(e) {
    e.preventDefault();
});

Portal


css to disable the function of selecting text by long press

* {
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  -html-user-select:none;
  -ms-user-select:none;
  -moz-user-select:none;
  user-select:none;
}
Use

if you want to use

js.

 node.addEventListener('contextmenu', function(e){
    e.preventDefault();
  });
Menu