jQuery-contextMenu icon indicating copy to clipboard operation
jQuery-contextMenu copied to clipboard

sub menu out of position

Open chitgoks opened this issue 8 years ago • 23 comments

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. submenu

chitgoks avatar May 25 '17 23:05 chitgoks

Do you use the position.min.js or just library itself?

bbrala avatar Jun 12 '17 08:06 bbrala

hi. only library itself

chitgoks avatar Jun 12 '17 09:06 chitgoks

Ok thanks

bbrala avatar Jun 12 '17 14:06 bbrala

This should be fixed in master right now. :)

See https://github.com/swisnl/jQuery-contextMenu/pull/565

bbrala avatar Sep 08 '17 12:09 bbrala

hi @bbrala it works now if jquery.position.min.js is included. so new fix requires this javascript file to be loaded?

chitgoks avatar Sep 08 '17 22:09 chitgoks

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.

AliShahrivarian avatar Sep 10 '17 06:09 AliShahrivarian

hi ali that is ok i will wait

thank you for taking time for this

chitgoks avatar Sep 10 '17 06:09 chitgoks

Hi again @chitgoks please use these two link and check if your problem solved: jquery.contextMenu.js jquery.contextMenu.css

AliShahrivarian avatar Sep 10 '17 18:09 AliShahrivarian

menu

Hi ali, problem not solved yet. this is the result

chitgoks avatar Sep 11 '17 01:09 chitgoks

Ok, I got the problem. I will fix it. (I'm going to work now :) I will check it in my free time)

AliShahrivarian avatar Sep 11 '17 02:09 AliShahrivarian

Thanks for the effort @Alisharivarian

bbrala avatar Sep 11 '17 06:09 bbrala

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

AliShahrivarian avatar Sep 11 '17 09:09 AliShahrivarian

works good!

chitgoks avatar Sep 12 '17 00:09 chitgoks

ill wait till the minifednfiles are updatd thank you

chitgoks avatar Sep 12 '17 12:09 chitgoks

You're welcome I will make PR.

AliShahrivarian avatar Sep 12 '17 13:09 AliShahrivarian

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.

bbrala avatar Sep 13 '17 05:09 bbrala

@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.

bbrala avatar Oct 02 '17 15:10 bbrala

hi bbrala. thank you. please post a comment once the minified files are updated as well

chitgoks avatar Oct 03 '17 03:10 chitgoks

@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.

AliShahrivarian avatar Oct 03 '17 05:10 AliShahrivarian

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 :)

bbrala avatar Oct 10 '17 15:10 bbrala

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.

AliShahrivarian avatar Oct 26 '17 18:10 AliShahrivarian

thank you ali

chitgoks avatar Oct 30 '17 09:10 chitgoks

I added an option for using scroll mode for now. "hasOverboundaryScroll" @bbrala, unfortunately I didn't resolve scroll problem yet.

AliShahrivarian avatar Nov 24 '17 18:11 AliShahrivarian