Comments (10)
The problem still remains. I tried the fix #14 but it doesn't fix the problem
from ctxmenu.
The changes are not on master branch yet, make sure you download from the 1.2 branch:
https://raw.githubusercontent.com/nkappler/ctxmenu/1.2/standalone/ctxmenu.js
Also, if you use images in your menu (I guess you do with the icons)
Make sure they are preloaded to the cache. Otherwise the size calculation happens before the image load and the menu ends up larger than it thinks.
Close your devtools, if you use the "disable cache" option.
This should do the trick hopefully.
Making the size calculation handle uncached images is more work, which I postponed for now
from ctxmenu.
Mozilla.Firefox.2021-02-06.03-32-43.mp4
There are still problems. In the lower right part of the screen, if you open the menu 2 times in a row, a bug appears a second time. The first time goes well. Make 2 menu items and switch them one by one in this corner. But there is already progress
from ctxmenu.
Our layout designer said that it is very wrong to embed css settings in a js file. Some styles overlap each other. Therefore, you need to keep everything separate.
from ctxmenu.
thanks for the hint, I fixed the issue.
Having some css properties in the code is intentional, otherwise I would need to make another request and load a second file, which I don't want. I want to keep it simple and fast.
The generated css is added as the first style sheet to the DOM, so overriding is very easy, as the included css rules have the least possible priority. This is done so you can restyle it easily. There should be nothing overlapping, are you facing problems?
Possible Future themes will be handled as css files though, as they would increase the file size otherwise and they are not needed by everyone.
from ctxmenu.
Now there is another problem. It was not there before. The menu does not close after other actions start. When opened through the menu of a modal window, the context menu itself does not close and always remains on top. See the screen.
Or you need a method to close the menu.
Mozilla.Firefox.2021-02-07.22-45-21.mp4
from ctxmenu.
P.S. I found you have a new undocumented method that allows you to close the menu. It worked for me. Now I can close the menu before opening the modal. It is perfectly. Excellent result. The previous message is no longer relevant.
ctxmenu.closeMenu();
from ctxmenu.
closeMenu is a private method as you should not nees to do this... I thought i fixed it already 😅
from ctxmenu.
Yes, everything has already been fixed. I wrote this before it was fixed. Everything is fine
from ctxmenu.
ok, great to hear 👍
from ctxmenu.
Related Issues (20)
- Size calculation wrong when body has a scrollbar and menu would overflow HOT 1
- Allow Esc key press to close the context menu HOT 2
- Make menu appear next to cursor HOT 1
- Suggestion: Change divider color HOT 5
- Error on postinstall script in published version HOT 2
- Position Calculation is wrong when body has css transform bug (2) HOT 19
- Menu is opened at the wrong position when Enter key is pressed HOT 3
- Keyboard navigation HOT 3
- Access parent menu selected target HOT 10
- Support Callback Functions for Submenus
- onMouseEnter/-Leave Events HOT 4
- without tabindex, focus and blur events won't work
- Allow to register an event when the contextual menu is hidden HOT 16
- Submenus containing multiple items may sometimes be displayed outside of the viewport HOT 1
- Add possibility to add classes to item HOT 5
- Microsoft Defender detects it as virus HOT 4
- prevent override on control key down HOT 3
- Adding context menu to multiple elements HOT 4
- get the element which is right clicked HOT 5
- attach a context menu to all items matching selector? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctxmenu.