Browse Source

Prevent modal from being dragged on iOS devices

Boss
Default User 1 month ago
parent
commit
647a03ab41
  1. 12
      supply.html

12
supply.html

@ -461,8 +461,13 @@
flex-direction: column; flex-direction: column;
z-index: 1000; z-index: 1000;
overflow: hidden; overflow: hidden;
/* 防止iOS滚动穿透 */ /* 防止iOS滚动穿透和模态框拖动 */
touch-action: none; touch-action: none;
/* 防止拖动 */
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
} }
.modal.active { .modal.active {
@ -485,6 +490,11 @@
overscroll-behavior: contain; overscroll-behavior: contain;
/* 允许触摸操作 */ /* 允许触摸操作 */
touch-action: auto; touch-action: auto;
/* 允许内容选择 */
user-select: auto;
-webkit-user-select: auto;
-moz-user-select: auto;
-ms-user-select: auto;
} }
.modal-body { .modal-body {

Loading…
Cancel
Save