Opened on 09/22/2014 at 03:52:05 PM

Closed on 09/26/2014 at 04:08:13 PM

#1428 closed defect (fixed)

"Block Element" doesn't work for XML documents

Reported by: passbrains Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-1.8.6-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: mapx Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description (last modified by sebastian)

Adapted from


Windows + Vista 64bit + Opera + English
ABP version Adblock Plus Version

How to reproduce

  1. Got to
  2. Right-click on the image highlighted with a red circle in the screenshot
  3. Choose Block Element

Observed behaviour

Nothing happens, beside the exception from comment:1 being logged to the console.

Also the "Block Element" option in the bubble does not work on that page.

Expected behaviour

Since this is an XML document we can't interact with the document as required to implement "Block Element". Therefore that code shouldn't run in the first place, that no exception shows up.

Also the "Block Element" option shouldn't be avaialable from the context menu and bubble on XML pages, which don't support that feature.

Attachments (1)

3659_1411069484_tablexml-image1.jpg (96.0 KB) - added by passbrains on 09/22/2014 at 03:52:07 PM.

Download all attachments as: .zip

Change History (7)

Changed on 09/22/2014 at 03:52:07 PM by passbrains

comment:1 Changed on 09/22/2014 at 03:52:41 PM by philll

  • Description modified (diff)

The following exception is logged in the console:

Error in event handler for runtime.onMessage: Cannot set property 'left' of null
Stack trace: TypeError: Cannot set property 'left' of null
    at addElementOverlay (chrome-extension://ldcecbkkoecffmfljeihcmifjjdoepkn/include.postload.js:96:22)
    at chrome-extension://ldcecbkkoecffmfljeihcmifjjdoepkn/include.postload.js:528:28
    at Object.EventTarget._dispatch (chrome-extension://ldcecbkkoecffmfljeihcmifjjdoepkn/ext/common.js:52:37)
    at chrome-extension://ldcecbkkoecffmfljeihcmifjjdoepkn/ext/content.js:3:24
    at function) (extensions::SafeBuiltins:19:14)
    at EventImpl.dispatchToListener (extensions::event_bindings:397:22)
    at function) (extensions::SafeBuiltins:19:14)
    at Event.publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:89:26)
    at EventImpl.dispatch_ (extensions::event_bindings:379:35)
    at EventImpl.dispatch (extensions::event_bindings:403:17) extensions::uncaught_exception_handler:9
handler extensions::uncaught_exception_handler:9
exports.handle extensions::uncaught_exception_handler:15
EventImpl.dispatch_ extensions::event_bindings:384
EventImpl.dispatch extensions::event_bindings:403
publicClass.(anonymous function) extensions::utils:89
messageListener extensions::messaging:190
EventImpl.dispatchToListener extensions::event_bindings:397
publicClass.(anonymous function) extensions::utils:89
EventImpl.dispatch_ extensions::event_bindings:379
EventImpl.dispatch extensions::event_bindings:403
publicClass.(anonymous function) extensions::utils:89
dispatchOnMessage extensions::messaging:304

comment:2 Changed on 09/22/2014 at 05:05:47 PM by mapx

  • Cc mapx added

comment:3 Changed on 09/24/2014 at 08:47:12 AM by sebastian

  • Owner set to sebastian

The problem is that it is an XML document. So we can't interact with the DOM the way we do with HTML documents to implement the "Block Element" feature.

First of all we should prevent that code from running on XML documents, to prevent errors like that. Then we should hide the "Block Element" option from the context menu and bubble on those pages, where that feature isn't supported there.

comment:4 Changed on 09/24/2014 at 09:08:17 AM by sebastian

  • Component changed from Unknown to Platform
  • Description modified (diff)
  • Platform changed from Opera to Unknown
  • Priority changed from Unknown to P3
  • Ready set
  • Summary changed from Images in table does not get blocked to "Block Element" doesn't work for XML documents

comment:5 Changed on 09/25/2014 at 04:15:39 PM by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:6 Changed on 09/26/2014 at 04:08:13 PM by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
Note: See TracTickets for help on using tickets.