davidtheclark/no-scroll

Previous styles on documentElement are not restored

Open

#10 ouverte le 2 janv. 2019

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)HTML (13 forks)github user discovery
bughelp wanted

Métriques du dépôt

Stars
 (244 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

I had a use case where the documentElement had inline styles on it, like so: <html style="padding: 0; margin: 0; overflow-x=hidden;">. I noticed that after toggling no-scroll to off, the overflow-x=hidden was being wiped out. After checking the code in no-scroll, I found that it's hard-coding the style attributes when off() is called. I think that no-scroll should be restoring whatever values were set before on() was called, instead of overwriting them.

Guide contributeur