Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md-menu: renders off page #2852

Closed
JT-Bruch opened this issue Jan 28, 2017 · 8 comments
Closed

md-menu: renders off page #2852

JT-Bruch opened this issue Jan 28, 2017 · 8 comments

Comments

@JT-Bruch
Copy link

Bug, feature request, or proposal:

Issue with md-menu & y-position="above" and the menu rendering off page. Additionally all unit tests fail due to #1913

What is the expected behavior?

The menu should populate above the clicked point.

What is the current behavior?

The menu is currently showing beneath the clicked point, and rendering off page.

What are the steps to reproduce?

  1. Clone https://github.com/ExcelerationDesigns/ng-cli-starter
  2. Run npm install
  3. Run 'ng serve' and navigate to localhost:4200
  4. Shrink the window so the top navigation disappears, and the bottom navigation appears.
  5. Click on the middle 'home' button.
  6. Observe the menu off page.

image

  1. Running ng test will also demonstrate all unit tests failing. The solution in [md-menu][bug] Tests crash in MdMenu.ngOnDestroy #1913 is confirmed as working.

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

What is the use-case or motivation for changing an existing behavior?

Make it so the user can actually click the menu. :)

Which versions of Angular, Material, OS, browsers are affected?

                             _                           _  _
  __ _  _ __    __ _  _   _ | |  __ _  _ __         ___ | |(_)
 / _` || '_ \  / _` || | | || | / _` || '__|_____  / __|| || |
| (_| || | | || (_| || |_| || || (_| || |  |_____|| (__ | || |
 \__,_||_| |_| \__, | \__,_||_| \__,_||_|          \___||_||_|
               |___/
angular-cli: 1.0.0-beta.26
node: 6.9.1
os: win32 x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/core: 2.4.5
@angular/flex-layout: 2.0.0-beta.4
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5
@angular/compiler-cli: 2.4.5

Is there anything else we should know?

Don't think so!

@JT-Bruch JT-Bruch changed the title md menu renders off page Defect - md menu renders off page Jan 28, 2017
@JT-Bruch JT-Bruch changed the title Defect - md menu renders off page md-menu: renders off page Jan 28, 2017
@crisbeto
Copy link
Member

This should've been fixed in master by #2677. You can try out the latest from master by running npm install https://github.com/angular/material2-builds.git

@JT-Bruch
Copy link
Author

Ah perfect - do we know if the issue regarding unit tests is also fixed in master?

@crisbeto
Copy link
Member

I'm not sure about the unit test issue, all of our unit tests pass both locally and on the CI.

@JT-Bruch
Copy link
Author

Yeah if you clone the repo, or take a look at this.. https://travis-ci.org/ExcelerationDesigns/ng-cli-starter just dropping the menu causes all unit tests to fail because of the subscription in the menu

@JT-Bruch
Copy link
Author

The fix by @shaxxx on #1913 fixes the issue.

    MdMenu.prototype.ngOnDestroy = function () {
        if (this._tabSubscription != null )
        {
            this._tabSubscription.unsubscribe();
        }
    };

@crisbeto
Copy link
Member

Alright, but it's better to keep all of the discussions regarding the unit test issue on #1913.

@JT-Bruch
Copy link
Author

True, but figured I might give that some love because I can't commit the change unless I get the unit tests up and working. :) Thanks for the time on this tho.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants