-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(drawer): Page content can be scrolled even if drawer is open #807
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
Codecov Report
@@ Coverage Diff @@
## master #807 +/- ##
==========================================
+ Coverage 99.93% 99.93% +<.01%
==========================================
Files 68 68
Lines 3119 3134 +15
Branches 383 384 +1
==========================================
+ Hits 3117 3132 +15
Misses 2 2
Continue to review full report at Codecov.
|
CLAs look good, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Just a few nits but overall looks good and seems to work nicely. Once the nits are addressed I'll merge it.
@@ -322,3 +322,18 @@ test('adapter#isDrawer returns false for a non-drawer element', () => { | |||
const {root, component} = setupTest(); | |||
assert.isNotOk(component.getDefaultFoundation().adapter_.isDrawer(root)); | |||
}); | |||
|
|||
test('adapter#addBodyClass adds a class to the body, locking the background scroll', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
techincally all addBodyClass/removeBodyClass
does is add/remove a class to the body (respectively). It's up to the class itself to determine the stylistic behavior. So maybe for these two test descriptions just say adds a class to [/ removes a class from] the body
.
BREAKING CHANGE: Adapter API for temporary drawers contains two new methods: `addBodyClass` and `removeBodyClass`. Closes material-components#777
@traviskaufman The Travis-CI build passed |
Hello this works great on normal Browser. |
Hello again |
BREAKING CHANGE: Adapter API for temporary drawers contains two new methods:
addBodyClass
andremoveBodyClass
.Closes #777
cc @amsheehan