8000 Merge pull request #18051 from twbs/impl-18044 · liuwenye2010/bootstrap@5923e6f · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5923e6f

Browse files
committed
Merge pull request twbs#18051 from twbs/impl-18044
Add touch-action:manipulation on interactive elements to avoid 300ms click delay
2 parents 01a44bf + 25e42ad commit 5923e6f

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

scss/_buttons.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
text-align: center;
99
white-space: nowrap;
1010
vertical-align: middle;
11-
touch-action: manipulation;
1211
cursor: pointer;
1312
user-select: none;
1413
border: $border-width solid transparent;

scss/_reboot.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,28 @@ img {
206206
cursor: pointer;
207207
}
208208

209+
210+
// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
211+
//
212+
// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11
213+
// DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present.
214+
// However, they DO support removing the click delay via `touch-action: manipulation`.
215+
// See:
216+
// * http://caniuse.com/#feat=css-touch-action
217+
// * http://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay
218+
219+
a,
220+
area,
221+
button,
222+
[role="button"],
223+
input,
224+
label,
225+
select,
226+
summary,
227+
textarea {
228+
touch-action: manipulation;
229+
}
230+
209231
//
210232
// Tables
211233
//

0 commit comments

Comments
 (0)
0