Open Bug 976428 Opened 7 years ago Updated 2 years ago

cannot do pointer-events none on panel


(Core :: DOM: UI Events & Focus Handling, defect)

27 Branch
Windows XP
Not set





(Reporter: noitidart, Unassigned)


(Whiteboard: [bugday-20140303])

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140212131424

Steps to reproduce:

run this code from scratchpad to create panel element with pointer-events none. double click the panel to remove it from the dom.

var win = Services.wm.getMostRecentWindow('navigator:browser');
var panel = win.document.createElement('panel');
var screen = Services.appShell.hiddenDOMWindow.screen;
var props = {
    noautohide: true,
    noautofocus: false,
    level: 'top',
    style: 'padding:15px; margin:0; width:200px; height:200px; background-color:rgba(0,0,0,0.1); -moz-pointer-events:none; border:0; -moz-appearance:none !important;'
for (var p in props) {
    panel.setAttribute(p, props[p]);

panel.addEventListener('dblclick',function() {
}, false);


panel.openPopup(null, 'overlap', screen.availLeft, screen.availTop);

Actual results:

pointer-events are caught, it does not allow highlighting of text underneath etc

Expected results:

pointer events should be ignored

Either the panel disappears right after appearing, or Scratchpad shows "Exception: Services is not defined".
Whiteboard: [bugday-20140303]
Ah please set scratchpad environment to "Browser". It's an XUL thing.
Same, but maybe the environment doesn't actually matter: although the panel is not visible (maybe that's what hiddenDOMWindow means?),
clicks and hovers in that area don't work.  After double clicking, they do work.

Moving per bug 880671, though I don't understand.
Component: Untriaged → Event Handling
Product: Firefox → Core
Ohhhh oooops pasted wrong code haha Ill update it. instead of hiddenDOMWindow it should be Services.wm.getMostRecentWindow('navigator:browser')
oh wait no dude it works i just use hiddenDOMWindow to get the screen dimensions :P. it adds a panel at top left at 0,0 of screen thats very faint its opactiy is .2
Environment must be Browser otherwise will fail for sure. Because I use Services.jsm
Have we ever supported prefixed -moz-pointer-events?  Regardless, we don't now.  Does it work if you replace it with 'pointer-events: none' without the prefix?
Flags: needinfo?(noitidart)
Hi Cameron, I tried it out, it was same situation :(
So in total i tried these 4 combintations:

none of them work the panel still takes poitner events
Flags: needinfo?(noitidart)
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.