The default bug view has changed. See this FAQ.

pageActions are never shown on about:blank and about:newtab URLs

NEW
Unassigned

Status

()

Toolkit
WebExtensions: Frontend
17 days ago
6 days ago

People

(Reporter: ValentinaP, Unassigned, NeedInfo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [pageAction], Needs UX)

Attachments

(1 attachment)

(Reporter)

Description

17 days ago
Created attachment 8845314 [details]
aboutblank.gif

Prerequisites:
- FF55 clean profile
- “xpinstall.signatures.dev-root” set to “true”
- “Back to Source Tab” WebExtension installed (test submission at - https://addons-dev.allizom.org/en-US/firefox/addon/back-to-the-source-tab-test/)

Steps to reproduce:
1. Open the developer tools Web Console (e.g. using the Developer Tools menu or Ctrl+Shif+K command)
2. Open a new blank tab using the console (command: window.open();)

Expected results:
Source tab option should be available in the about:blank tab.

Actual results:
Source tab option is not available in the about:blank tab.

Notes/Issues:
- reproducing also for new window (command:  window.open('','new-window-1','width=1920,height=1000'); )
Verified on FF55.0a1 (2017-03-08) using Windows 7.
Attaching video for this issue.

Comment 1

17 days ago
I did some testing and it seems that, while the onCreatedNavigationTarget event has been received as expected, the pageAction icons are not visible on some of the "about:" urls, e.g.

about urls where the pageAction is never shown:
- about:blank
- about:newtab

about urls where the pageAction is shown as for any other url:
- about:addons
- about:debugging
- about:config
- about:mozilla
- about:support
- about:robots

Comment 2

17 days ago
After some digging, I can confirm the behavior described by Comment 1.

It seems that we already meet this behavior in Bug 1316020 Comment 17.

The reason seems to be that URLBarSetURI (http://searchfox.org/mozilla-central/rev/78ac0ceba97bd2deed847a8d0ae86ccf7a8887bf/browser/base/content/browser.js#2534-2565) is marking "about:blank" and "about:newtab" as "invalid", while "about:addons" etc. are marked as "valid".

Also, in our test suite the `clickPageAction` test helper seems to workaround this kind of issue my forcing it to be marked as "valid": http://searchfox.org/mozilla-central/rev/78ac0ceba97bd2deed847a8d0ae86ccf7a8887bf/browser/components/extensions/test/browser/head.js#324-332
No longer blocks: 1190687
Component: WebExtensions: Request Handling → WebExtensions: Frontend
Summary: "about:blank" page does not have a "Back to source tab" option → pageActions are never shown on about:blank and about:newtab URLs
Whiteboard: [pageAction]

Comment 3

17 days ago
In particular, the following CSS rules are the one that hide (well, "collapse" to be precise) all the urlbar-icons (included the WebExtension PageActions, on the contrary the usercontext icon and label is in a different xul element and it is not hidden on urls considered "invalid"): 

http://searchfox.org/mozilla-central/rev/78ac0ceba97bd2deed847a8d0ae86ccf7a8887bf/browser/base/content/browser.css#579-584

If we want to make the WebExtensions pageActions visible on these URLs without introducing any additional risks/impact for any urlbar icon that is not related to the WebExtensions pageAction API, a reasonable option can be to introduce an additional and more specific CSS rule for the WebExtensions pageActions in the browser.css file, and exclude them from being collapsed on such URLs, something like:

    /* Ensure WebExtensions pageAction are not collapsed on about:blank and about:newtab URLs */
    #urlbar[pageproxystate="invalid"] > #urlbar-icons > .urlbar-icon.webextension-page-action {
      visibility: visible;
    }

How that sound to you Kris?
Flags: needinfo?(kmaglione+bmo)

Comment 4

13 days ago
Looking for front-end input on if the icon should be seen at this point.  know it's an area changing in photon
Flags: needinfo?(shorlander)
Flags: needinfo?(kmaglione+bmo)

Updated

6 days ago
Whiteboard: [pageAction] → [pageAction], Needs UX
You need to log in before you can comment on or make changes to this bug.