-
Notifications
You must be signed in to change notification settings - Fork 743
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
Submenu resize weirdly #308
Comments
Hi, ill have a look this week to see what is happening. It seems it happens on the first item of submenu for me? |
I have updated my jsfiddle to show that is the longest of the items in the submenu that gets to two lines. http://jsfiddle.net/RareDevil/vww70pLa/1/ I may be looking at making a pull request that removes the width from javascript and let css control it like i have managed to do it in my little project of learning to make jQuery widgets. I decided to make a contextmenu but that was just before swisnl took over this one. There is a sample of the menu here http://raredevil.ovh/contextmenu/ I have manage to fix on my own fork. but the only problem i have right now is that i cant find the src css file i can only locate the dist css file. Is it missing or should i just make a pull request with my change on the dist css file or will the src css come back ? Here is a fix. Its simple and one line css that was needed: http://jsfiddle.net/RareDevil/vww70pLa/2/ |
The width with JS is how it always worked, i'm not sure if that is really needed anymore, i'll as the designer @RoachMech to have a look. In order to generate the new dist files for the CSS you need to have NodeJS and Npm installed. Using If you want to make changes to the CSS use the SASS files and regenerate the CSS with You can make the changes in https://github.com/swisnl/jQuery-contextMenu/blob/master/src/sass/jquery.contextMenu.scss, if you cant get gulp to run, that is fine too, ill regenerate the files when i accept the pull request. |
I have never used gulp so i just made the changes to the scss file it was just one small line. |
I merged the SCSS and updated the dist files. I will walk to @RoachMech and ask him to look tomorrow, since he might've missed my ping. |
Sounds great. Cant wait to hear what will happen when @RoachMech looks at this. |
No news on this one ? |
I've looked into this and it seems like the entire resize() method is no longer of use and can therefore be removed. @bbrala can you confirm this? The 1px of the first submenu item is a little optical illusion. It is the border of the submenu, see the attached image. |
I cant see how a border can mess up and make the submenu size wrong. If you look at this jsfiddle http://jsfiddle.net/RareDevil/vww70pLa/1/ that i made that have the problem you can see that the first item in the submenu is on 2 lines, this is because for some unknown reason the menu element have a size of XXpx and the size is one pixel of to make the item not be on two lines. |
Hmm, think i misunderstood your problem. I see the issue with the second line on IE only. I don't trust myself enough with CSS to fix this, so i'll ask @RoachMech again. |
Whats the status on this? When i have the time to look at this again i will look at better fix for this because if you have a long text in the menu item then it will go out of the menu item. |
If you could give it a try that would be awesome. I'll build the css afterwards if you like. Roach seems to have little time available :( |
I don't mind taking the time to fix this properly. Special since i use this a lot and it give me a little break from all the other stuff i make to look at this and find the problem and fix the problem. |
I have manage to fix this problem in my pull request #323 and i dont know why i didnt find this way to fix it before... |
Well done, i'll try and have a look soon. :) |
@bbrala Whats the status on this one ? |
Checked and merged 👍 |
I have just updated to version 2.0.0 and noticed that the submenu sometimes resize weird and for some reason its missing 1 px in the width even tho the width is not over max-width.
I have made a jsfiddle that shows the problem here: http://jsfiddle.net/RareDevil/vww70pLa/
I'm still trying to find out why this problem is there and i have not yet found the problem.
The text was updated successfully, but these errors were encountered: