Git Product home page Git Product logo

Comments (10)

musicman3 avatar musicman3 commented on September 28, 2024

The problem still remains. I tried the fix #14 but it doesn't fix the problem

from ctxmenu.

nkappler avatar nkappler commented on September 28, 2024

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.

musicman3 avatar musicman3 commented on September 28, 2024
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.

musicman3 avatar musicman3 commented on September 28, 2024

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.

nkappler avatar nkappler commented on September 28, 2024

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.

musicman3 avatar musicman3 commented on September 28, 2024

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.

musicman3 avatar musicman3 commented on September 28, 2024

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.

nkappler avatar nkappler commented on September 28, 2024

closeMenu is a private method as you should not nees to do this... I thought i fixed it already 😅

from ctxmenu.

musicman3 avatar musicman3 commented on September 28, 2024

Yes, everything has already been fixed. I wrote this before it was fixed. Everything is fine

from ctxmenu.

nkappler avatar nkappler commented on September 28, 2024

ok, great to hear 👍

from ctxmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.