davidtheclark / davidtheclark/no-scroll

Previous styles on documentElement are not restored

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
HTML
Stars
243
Forks
13
PR merge metrics
No merged PRs in 30d

Description

I had a use case where the `documentElement` had inline styles on it, like so: ``. 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.