Closed Bug 1775238 Opened 2 years ago Closed 2 years ago

Horizontal scrollbar in browser_style popup

Categories

(WebExtensions :: Untriaged, defect, P5)

Firefox 101
defect

Tracking

(firefox102 affected, firefox103 affected, firefox104 affected)

RESOLVED WONTFIX
Tracking Status
firefox102 --- affected
firefox103 --- affected
firefox104 --- affected

People

(Reporter: manikulin, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0

Steps to reproduce:

I was developing an add-on with browserAction popup. Unfortunately it was rendered with a horizontal scrollbar. I read

and decided to try "browser_style": true for it. I can not say that I was satisfied by the result.

  • Load the extension provided below (it is a bit shortened example from MDN).
  • Click on the browser action toolbar button.
  • Look at the popup

manifest.json

{
	"manifest_version": 2,
	"name": "browser-style-popup",
	"version": "0.2",
	"browser_action": {
		"browser_style": true,
		"default_title": "Browser Style Popup",
		"default_popup": "browser-style-popup.html"
	}
}

browser-style-popup.html

<!DOCTYPE html>
<html>
  <head><meta charset="UTF-8">
    <title>Browser Style Popup</title>
  </head>
  <body>
    <header class="panel-section panel-section-header">
      <div class="icon-section-header"><!-- An image goes here. --></div>
      <div class="text-section-header">Header</div>
    </header>

    <div class="panel-section panel-section-list">
      <div class="panel-list-item">
        <div class="icon"></div>
        <div class="text">List Item</div>
        <div class="text-shortcut">Ctrl-L</div>
      </div>
    </div>

    <footer class="panel-section panel-section-footer">
      <button class="panel-section-footer-button">Cancel</button>
      <div class="panel-section-footer-separator"></div>
      <button class="panel-section-footer-button default">Confirm</button>
    </footer>
  </body>
</html>

Actual results:

My designer skills are rather poor (it is the reason of my intention to use browser style), but I see a number of issues with the popup. The most apparent one is horizontal scrollbar. I faced the problem some time ago before changing design of scrollbars, so they were more prominent.

Expected results:

No horizontal scrollbar for recommended minimal example. Either

  • rendering engine is fixed for such case,
  • "browser_style": true for browser_action is discouraged by docs instead of recommending such option,
  • extension.css is fixed to avoid overflow.

I am not alone with such problem, see
https://github.com/mdn/webextensions-examples/blob/master/webpack-modules/addon/popup/style.css

For some reason the footer creates a horizontal overflow

Horizontal scrollbar is caused by negative margins of footer buttons.

You may try [Tab] key when the popup is open to increase degree of disappointment due to appearance of the dialog.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Component: DOM: Core & HTML → Untriaged
Product: Core → WebExtensions

Hello,

I reproduced the issue on the latest Nightly (104.0a1/20220627215036), Beta (103.0b1/20220627170120) and Release (102.0/20220623063721) under Windows 10 x64 and Ubuntu 16.04 LTS, using the attached extension.

A horizontal scrollbar is present after opening the popup, as mentioned.

For details, see the attached screenshot.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached image 2022-06-28_10h31_32.png
Severity: -- → S4
Priority: -- → P5

Closing bug because support for browser_style feature is going to be removed (at least in MV3), see bug 1827910.

Blocks: 1458678
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: