зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1366783 Loosen responsive design mode test check for 300ms touch delay. r=jryans
This commit is contained in:
Родитель
8382efc2b2
Коммит
d0da707a64
|
@ -71,7 +71,10 @@
|
|||
div.addEventListener("mousedown", function (evt) {
|
||||
if (previousEvent === "touchend" && touchendTime !== 0) {
|
||||
let now = performance.now();
|
||||
div.dataset.isDelay = ((now - touchendTime) >= 300);
|
||||
// Do to time spent processing events our measurement might
|
||||
// be fractionally short of the actual delay. Round up any
|
||||
// microsecond changes in case we get something like 299.9.
|
||||
div.dataset.isDelay = ((now - touchendTime) >= 299.5);
|
||||
} else {
|
||||
div.dataset.isDelay = false;
|
||||
}
|
||||
|
|
|
@ -70,7 +70,10 @@
|
|||
div.addEventListener("mousedown", function(evt){
|
||||
if (previousEvent === "touchend" && touchendTime !== 0) {
|
||||
let now = performance.now();
|
||||
div.dataset.isDelay = ((now - touchendTime) >= 300) ? true : false;
|
||||
// Do to time spent processing events our measurement might
|
||||
// be fractionally short of the actual delay. Round up any
|
||||
// microsecond changes in case we get something like 299.9.
|
||||
div.dataset.isDelay = ((now - touchendTime) >= 299.5) ? true : false;
|
||||
} else {
|
||||
div.dataset.isDelay = false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче