amsul / amsul/pickadate.js

`getRealEventTarget` should use `Event.composedPath()` instead of `Event.path`

Aberta
#1,239 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
7.6k
Forks
981
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

https://github.com/amsul/pickadate.js/blob/0fd34eab2b4127bc93dedca70285f1d38eb89983/lib/picker.js#L996-L1017

`getRealEventTarget()` uses `Event.path`, which is a non-standard API available only in Chromium-based browsers.

It should instead use `Event.composedPath()` [1], which is a standard API that returns the same result but is supported by all major browsers [2].

Chromium is also deprecating `Event.path` in favor of `Event.composedPath()`.

See:
[1] https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
[2] https://caniuse.com/?search=Event.composedPath
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=1277431

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.