Ver código fonte

Fix a bug on the Pointer Tracker

customisations
alemart 2 meses atrás
pai
commit
7dbb1645bb
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6
    0
      src/trackers/pointer-tracker/pointer-tracker.ts

+ 6
- 0
src/trackers/pointer-tracker/pointer-tracker.ts Ver arquivo

349
             // what if we receive 'began' after 'ended' in the same frame?
349
             // what if we receive 'began' after 'ended' in the same frame?
350
             else if(phase == 'began' && current) {
350
             else if(phase == 'began' && current) {
351
                 if(current.phase == 'ended' || current.phase == 'canceled') {
351
                 if(current.phase == 'ended' || current.phase == 'canceled') {
352
+                    // ignore the 'began' and maintain the 'ended'
353
+                    // issue on Epiphany: pointerenter may come after a pointerup -> pointerleave sequence
354
+                    if(event.type == 'pointerenter')
355
+                        continue;
356
+
357
+                    // ignore the 'ended' and the 'began'
352
                     this._newPointers.delete(id);
358
                     this._newPointers.delete(id);
353
                     continue;
359
                     continue;
354
                 }
360
                 }

Carregando…
Cancelar
Salvar