jQuery-contextMenu
jQuery-contextMenu copied to clipboard
sub menu out of position
please see attached. dev console in chrome is open to simulate this.
when the first context menu shows, it shows it above the dev console. once i navigate over to the sub menu, it does not position itself correctly.

Do you use the position.min.js or just library itself?
hi. only library itself
Ok thanks
This should be fixed in master right now. :)
See https://github.com/swisnl/jQuery-contextMenu/pull/565
hi @bbrala it works now if jquery.position.min.js is included. so new fix requires this javascript file to be loaded?
hi @chitgoks , sorry, I forgot to check my PR on sub menu (because my issue was on root contextMenu). I will correct your issues in next days.
hi ali that is ok i will wait
thank you for taking time for this
Hi again @chitgoks please use these two link and check if your problem solved: jquery.contextMenu.js jquery.contextMenu.css

Hi ali, problem not solved yet. this is the result
Ok, I got the problem. I will fix it. (I'm going to work now :) I will check it in my free time)
Thanks for the effort @Alisharivarian
Don't mention it @bbrala :+1: @chitgoks could u check these files again? Sorry I'm using remote desktop and it's hard to test correctly.(it's too slow) jquery.contextMenu.js jquery.contextMenu.css
works good!
ill wait till the minifednfiles are updatd thank you
You're welcome I will make PR.
Thanks for the PR. I probably won't be able to test this the next 2 weeks since I'm on vacation. But will do when I come back.
@AliShahrivarian I've checked the PR, but the position:fixed; you added breaks if you scroll down a bit, everything is relative to the browser window now.
hi bbrala. thank you. please post a comment once the minified files are updated as well
@bbrala There is some way to correct the positioning issue. keeping current solution and: 1- setting event on body scroll, so we can change position of opened contextMenu with scroll change. 2- preventing other elements from scrolling on opened contextMenu
Or: The current implementation of menu and sub menu is not good for solution that I implemented so: 1- keep current implementation of subMenu behavior and just append it to body on contextMenu open (so we can position it independently) and after closing subMenu, sending back to its parent element. 2- refactoring current code and pushing subMenu's in element Data or keeping them in variable then on opening contextMenu we will append them to the body.
We can't really stop scrolling or append the contextmenu to the element is opens on. This will open the plugin to loads of new bugs regarding positioning.
I don't completely understand you last two suggestions to be honest, i'll try to read them again in the morning when i'm a bit more fresh :)
hi @chitgoks Sorry I have a lot of works to do nowadays. I did commit on for min version in my repo. You can get it. I'm working on scroll issue.
thank you ali
I added an option for using scroll mode for now. "hasOverboundaryScroll" @bbrala, unfortunately I didn't resolve scroll problem yet.