4 ms·
I find it kind of disarming to overload not-typically-overloaded events like this though. I wonder if it'd be possible to let the right-click menu appear as nor
by famousactress 15y ago
I find it kind of disarming to overload not-typically-overloaded events like this though. I wonder if it'd be possible to let the right-click menu appear as normal, but background a div that pops up and give you the option of downloading the nicer logo files?
- soult 15y agoIn Firefox you can untick "Allow scripts to Disable or replace context menus" (hidden under Preferences/Content/Enable Javasript/Advanced), which gives exactly the behaviour that you described. I assume other browsers have similar options.
- cannuk 15y agoThat should be possible if you do not cancel the event bubble when the overlay is shown. I did not have time to inspect their code, but I assume they are canceling the event.
- unfletch 15y agoYou're thinking of preventing the default action, not stopping propagation. (Event.preventDefault() vs. Event.stopPropagation() in modern browsers.) But you're right, if they handled the right-click and did not explicitly prevent the default action it would do both.
- oops 15y agoIt's not exactly what you suggested, but with HTML5 you can add to the browser's context menu: http://hacks.mozilla.org/2011/11/html5-context-menus-in-firefox-screencast-and-code/ http://hacks.mozilla.org/2011/11/html5-context-menus-in-fire... http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#context-menus http://www.whatwg.org/specs/web-apps/current-work/multipage/...