material icon indicating copy to clipboard operation
material copied to clipboard

md-menu : Throwing error in latest master

Open chinnichaitanya opened this issue 11 years ago • 6 comments

This is screenshot of the error in the console on clicking any menu button in the latest master. It seems to be fine in 0.10.0-rc1 though.

2015-06-10-003302_1366x768_scrot

chinnichaitanya avatar Jun 09 '15 19:06 chinnichaitanya

I think it throws at line 250, i.e. at the second line of the following snippet.

      var containerNode = el[0],
          openMenuNode = el[0].firstElementChild,
          openMenuNodeRect = openMenuNode.getBoundingClientRect(),
          boundryNode = opts.parent[0],
          boundryNodeRect = boundryNode.getBoundingClientRect();

el[0] is undefined here.

Frank3K avatar Jun 09 '15 19:06 Frank3K

Same here, the menu component is broken after 0.10.0-rc2

dohomi avatar Jun 10 '15 05:06 dohomi

function positionMenu(scope,el, opts) {

Just add scope back in as above, it is missing in the RC2 release, but in the RC1 release, works as intended once done

barhaleacct avatar Jun 10 '15 08:06 barhaleacct

As @barhaleacct said, I can confirm adding scope back makes the md-menu directive work properly again.

fjoubert avatar Jun 10 '15 09:06 fjoubert

Should be fixed by fb245fb.

Frank3K avatar Jun 11 '15 16:06 Frank3K

Yes it is fixed.

chinnichaitanya avatar Jun 11 '15 16:06 chinnichaitanya