Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • adblockplusui adblockplusui
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 265
    • Issues 265
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Adblock incAdblock inc
  • ExtensionsExtensions
  • Adblock PlusAdblock Plus
  • adblockplusuiadblockplusui
  • Issues
  • #1303
Closed
Open
Issue created Nov 28, 2022 by Adilson Sandoval@2alinMaintainer

"Block element" feature not available for tabs that are still loading after content scripts are ready

Environment

  • OS version: Manjaro with Kernel 5.19.17-2
  • Browser version: Chromium 107.0.5304.110
  • Extension version: ABP 3.15
  • Last working version: ABP 3.14.2

Steps to reproduce

There are two options to reproduce this issue:

a) Natural way - not very precise as it all depends on the loading speeds of the page and the extension, as well as cache affecting the results:

  1. Disable cache through developer tools (Network tab).
  2. Open a heavy page like https://www.marca.com. Recommended a hard refresh (Shift-F5).
  3. Wait until the page finishes loading ("loading" tab icon is removed) and open the ABP popup.

b) (recommended, only Chromium based [1]) Forcing a tab's "loading" event after the extension finishes loading the content scripts:

  1. Disable cache through developer tools (Network tab).
  2. Go to https://example.com/ and wait until page loads. Open ABP popup menu, the block element feature should be available as the page is not heavy.
  3. Append an iframe to the document, e.g. const iframe = document.createElement("iframe"); document.body.appendChild(iframe); iframe.src = "";
  4. Change the src attribute that will force the tab to change its state to "loading": iframe.src = https://example.com/

[1]: The method (b) doesn't work on Firefox, as the tab's "loading" event doesn't get triggered through iframe loading.

Observed behavior

The "block element" button doesn't appear in the popup

Expected behavior

The "block element" button should appear in the popup

Further information

In ABP 3.15, we shipped (#1070 (closed)) a new tab session state logic as part of MV3 required changes, that logic purges the tab session state on "loading" tab events. As, for the filter composer, we are not reacting to future "complete" tab events, the extension will either forget that the page was ready to use the composer or fail to check again if it's ready. Which means that in cases where the page loads after the composer content script finishes loading, like heavy or complex pages, the extension won't provide the "block element" feature to the user.

Hints for testers

The following state should be as expected while navigating between web pages:

  • Icon badge state (i.e. badge text, whether the badge text hidden).
  • Icon allowlisted state (i.e. whether tab is allowlisted).
  • Blocked counter state (i.e. page-specific blocked counter shown in icon and in icon popup).
  • Developer tools reload state (i.e. whether "reload" link is shown in developer tools panel).
  • Filter composer active state (i.e. whether the content script is running that causes the Block element button to be shown in the icon popup).
Edited Nov 29, 2022 by Thomas Greiner
Assignee
Assign to
Time tracking