Contextmenu submenu appears out of view area #1596

Closed
krojew opened this Issue Dec 15, 2016 · 6 comments

Projects

None yet

5 participants

@krojew
krojew commented Dec 15, 2016

I'm submitting a ... (check one with "x")

[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
When a context menu has a submenu and it's invoked near the border of the page, the submenu is extended past the browser window causing scroll bars to appear.

Expected behavior
Submenu should be positioned on the opposite side, like with desktop menus.

Minimal reproduction of the problem with instructions

  1. Create a simple context menu wit ha submenu.
  2. Clik near the edge of the browser window and observe results.

What is the motivation / use case for changing the behavior?
The menu should behave like desktop menus, and not extend the document past the view area size.

Please tell us about your environment:
Firefox, TS 2.1.4

  • Angular version: 2.0.X
    2.1.1

  • PrimeNG version: 2.0.X
    1.1.0

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    Firefox, most likely other too.

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    TS 2.1.4

@Mrtcndkn
Contributor

Hi,
Actually thats implemented and i couldn't replicate it can you create a plunker for this.

@krojew
krojew commented Dec 16, 2016

The same issue appears on the demo page: http://www.primefaces.org/primeng/#/contextmenu

@alexavator
alexavator commented Dec 19, 2016 edited

Hello, I came across with the same problem. The problem only with SUBMENU. A context menu itself opens normally always, but a submenu always opens to the right side. I check it at Google Chrome browser and at Edge Browser.

@krojew
krojew commented Dec 19, 2016

To illustrate the issue (taken from the demo page):
contextmenu

@Mrtcndkn Mrtcndkn added the defect label Dec 19, 2016
@Mrtcndkn
Contributor

All right i replicated it too i will work on this and get back to you from here.

@Mrtcndkn Mrtcndkn added enhancement and removed defect labels Dec 19, 2016
@Mrtcndkn Mrtcndkn self-assigned this Dec 19, 2016
@Mrtcndkn Mrtcndkn added this to the 2.0 milestone Dec 19, 2016
@cagataycivici cagataycivici modified the milestone: 2.0, 1.1.1 Dec 21, 2016
@cagataycivici cagataycivici assigned mertsincan and unassigned Mrtcndkn Dec 28, 2016
@mertsincan mertsincan added a commit that closed this issue Dec 28, 2016
@mertsincan mertsincan Fixed #1596 2ce2f97
@alexavator

at whitch version I can get this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment