amsul / amsul/pickadate.js

translateY(100%) breaks entire page on some browsers, use translate(0,100%) instead

Aberta
#758 1 comentário 1 reação 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

I was working on a page and once I got to the testing phase I noticed that all pages using Pickadate were entirely broken. Content could not be scrolled and date picker window opened randomly by itself when tapping around the screen.

After a while I noticed that the plugin does not hide itself properly when it's inactive. Instead of using "display: none" the plugin uses "position: fixed" and "transform: translateY(100%);" to push the content away. TranslateY(y) is a 3D transform and has very poor backwards compatibility. Thus if the browser doesn't support 3D transforms the picker container will not be pushed away properly and will instead cover the entire screen with a transparent element that has a z-index of 10000.

Translate(x, y) on the other hand is a 2D transform and has great backwards compatibility (down to IE9). Why use the translateY when you can just as easily have much better support by using regular translate?

There are also many ways to use "display: none;" and still have the element animated when displaying it. The current implemenation should be changed.

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.