PolymerElements / iron-resizable-behavior

14 stars 21 forks source link

Parent resizable fails to receive resize notification when under shadow DOM. #32

Open n1ywb opened 7 years ago

n1ywb commented 7 years ago

Description

Parent resizables fail to receive resize notification when under shadow DOM.

Commenting out this line fixes the issue: https://github.com/PolymerElements/iron-resizable-behavior/blob/master/iron-resizable-behavior.html#L136

See also https://github.com/PolymerElements/paper-menu-button/issues/123

Shady DOM event call tree

Shady DOM event call tree

Shadow DOM event call tree; note lack of call to _onDescendantIronResize()

Shadow DOM event call tree; note lack of call to `_onDescendantIronResize()`

Expected outcome

The menu dropdown should resize to accommodate the submenu when the submenu is opened

Expected result

image

Actual outcome

The menu does not resize and is super skinny and fubar

image

Live Demo

https://readingplus.github.io/paper-menu-sizing-bug/components/paper-menu-sizing-bug/demo/index.html?dom=shadow

Steps to reproduce

  1. open demo using shadow DOM
  2. click on menu button
  3. click on submenu

Note that if you leave the submenu opened, close the menu, then reopen the menu, it will then resize to accommodate the submenu; this is, however, annoying to have to do.

Browsers Affected

n1ywb commented 7 years ago

Looks like this patch might be related to this issue: https://github.com/DreamworldSolutions/iron-resizable-behavior/commit/b246ff3ad1c961c237ece817822e5e78284d8d23

RoXuS commented 7 years ago

👍

An other example of the issue -> http://jsbin.com/codakapiwu/edit?html,console,output

n1ywb commented 6 years ago

Folks there's been a PR sitting in here for a year to fix this bug; can we get it merged? @notwaldorf can you help us out with this?