Before we begin, here's a preview of what we'll be creating.
Let's discuss a few use cases of a custom context menu.
You wish to dis...
For further actions, you may consider blocking this person and/or reporting abuse
pretty cool post nice !
in addition if someone wants context triggered only on certain element :
The more interesting is: how to extend the existing context menu.
Custom is always bad, it hides the browser's one, looks sometimes odd, if you have a custom OS theme or something like that and it often does not behave, like you would expect it (from the normal one).
This is at least my thinking of it, and there might be more reasons why a custom context menu is bad.
Any Advice to not make the ContextMenu not deform the Page such as Crating a Space over all content so when right clicking the page does not get deformed or not expand (Scrollbars.
Awesome Tut Thx :)
To achieve that Jared, you'll have to set the menu's position to
fixed
orabsolute
. I just realised I had set it torelative
in the tut. Setting theposition
tofixed
orabsolute
should solve that. I'm glad you enjoyed the article. Thanks 😇Exactly!
Cool, I've always thought that it's super-complicated and that's why so few does it. I stand corrected. Thanks :)
I thought so too until I decided to try it. Glad you liked it.
This is the best explanation on this topic I have seen! Thanks!
how to add sub list to list item?
But when we click near the edge of the screen the context menu is hidden by the edge of the screen. Is there any solution for that ?
Also, here is a problem with the menu if you call to at page's bottom and/or right.
setPosition should be more complex. Consider to page and menu size.
Does not work for me on Opra,Chrome, and Firefox!
Does not work!
i'm getting some problem when right button is clicked the margin at the top is extending with blank space...
So please anyone suggest solution for the problem...
email : chandan11krishna@gmail.com