Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7440111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:48:07+00:00 2026-05-29T10:48:07+00:00

My absolutely positioned canvas elements are blocking all the mouse events so that nothing

  • 0

My absolutely positioned canvas elements are blocking all the mouse events so that nothing underneath them can be clicked, same problem mentioned here and here.

I have multiple canvas layers that need to be at specific z-index’s so I need to forward mouse events through the canvases. pointer-events: none; works in good browsers, but for IE9 I need javascript to do it, here is my current solution,

 var evts = [ 'click', 'mousedown', 'mouseup', 'dblclick'],
                canvases = $('canvas');

            $.each(evts, function(_, event){
                canvases.bind(event, function(evt){
                    var target,
                        pEvent;
                    $(this).hide();
                    target = document.elementFromPoint(evt.clientX, evt.clientY); 
                    $(this).show();
                    pEvent = $.Event(event);
                    pEvent.target = target;
                    pEvent.data = evt.data;
                    pEvent.currentTarget = target;
                    pEvent.pageX = evt.pageX;
                    pEvent.pageY = evt.pageY;
                    pEvent.result = evt.result;
                    pEvent.timeStamp = evt.timeStamp;
                    pEvent.which = evt.which;
                    $(target).trigger(event, pEvent);
                 });
            });   

Working example,
jsFiddle

Questions;

1. I’m creating the new event and passing over the relevant data, would it be safe to pass the evt var with the target and currentTarget modified?

2. How can I propogate a right click?

Or does anyone have a better way to accomplish this? The other related questions are quite old.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:48:08+00:00Added an answer on May 29, 2026 at 10:48 am

    There’s no clean way to pass the events cross-browser. You can pass the (modified) event on but you can’t guarantee that it will work as it might have naturally, especially cross-browser.

    For right click using your code just do this: http://jsfiddle.net/6WMXh/20/

    (you half used the jquery extra info part but never did anything with it)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an absolutely positioned div that has a width of 100% with a
So I have this template design that is currently absolutely positioned, but I'm trying
So I've got a page that shows an image with some absolutely positioned text
In every browser I've used, except ie8, an absolutely positioned element can be positioned
If absolutely positioned or fixed positioned elements are taken out of the normal flow,
I've setup my app/website such that I have an absolute-positioned canvas element on top
I am trying to animate an element that is absolutely positioned and positioned bottom
Can an HTML canvas tag be positioned over other html content on a page?
I have an absolutely positioned div containing several children, one of which is a
When using IE, you cannot put an absolutely positioned div over a select input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.