material icon indicating copy to clipboard operation
material copied to clipboard

panel: disableParentScroll:true disables both mdPanel and parent

Open nitsud333 opened this issue 8 years ago • 8 comments

Actual Behavior:

  • What is the issue? *setting disableParentScroll: true disables mdPanel scroll ability
  • What is the expected behavior? Panel should scroll while background doesn't.

CodePen (or steps to reproduce the issue): *

  • `CodePen Demo which shows your issue: https://codepen.io/nitsud333/pen/WoeWpP
  • `Details: While checkbox is unchecked, Select Menu options are scroll-able. When checkbox is checked, Select Menu options are not scroll-able.

Angular Versions: *

  • Angular Version:1.5.5
  • Angular Material Version:1.1.0

nitsud333 avatar Nov 02 '16 15:11 nitsud333

Same issue here, version 1.1.4 of Material.

Disable Scroll Mask is set to true on MdPanel

MdPanelRef.prototype._createPanel = function() {
...
if (self.config['disableParentScroll']) {
    self._restoreScroll = self._$mdUtil.disableScrollAround(
    null, self.panelContainer, { disableScrollMask: true });
}

setting disableScrollMask: false fixes the issue.

In my case, the scroll wheel and touchmove are only disabled, I can scroll manually by dragging the scroll bar down. It seems the demo above does the same.

Anybody know why disableScrollMask is hard-coded to true? As far as I see, setting it to false fixes this issue.

When it's set to true it attaches the disable mousewheel and touchmove events to the panel.

otterslide avatar Aug 22 '17 03:08 otterslide

Has this not been resolved? I'm experiencing this right now. Pretty annoying.

ronilio avatar May 24 '18 20:05 ronilio

I updated the CodePen to 1.1.9 and this is still an issue.

Splaktar avatar May 26 '18 23:05 Splaktar

Any solution for this issue?

scriptsure avatar Dec 17 '18 01:12 scriptsure

The proposition of otterslide seems working. At this moment we didn't experiment any disturbing side effect.

laetitia-gangloff avatar Dec 17 '18 06:12 laetitia-gangloff

So you literally made source code changes then reuglified the js? Pain right?

scriptsure avatar Dec 17 '18 14:12 scriptsure

Not really, I just edit both files. We use an older version and we are linked to bower (why it is bower-material and not angular-material branch). But you can see my current version here: https://github.com/laetitia-gangloff/bower-material/commit/f2c8486eb376eed2b00c66b03840dbe4c29c40d3

laetitia-gangloff avatar Dec 17 '18 14:12 laetitia-gangloff

I tried the suggestion by @otterslide above with the latest code in master and this didn't work for me. I wasn't able to scroll the menu even by dragging the vertical scrollbar.

Splaktar avatar Dec 20 '18 19:12 Splaktar