Open Bug 1774722 Opened 2 years ago Updated 2 years ago

Paste using middle click to add-on options_ui page blocked by vertical overflow (Linux, X11)

Categories

(WebExtensions :: Untriaged, defect, P5)

Firefox 101
defect

Tracking

(firefox102 affected, firefox103 affected, firefox104 affected)

Tracking Status
firefox102 --- affected
firefox103 --- affected
firefox104 --- affected

People

(Reporter: manikulin, Unassigned)

Details

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

Steps to reproduce:

I was developing a thunderbird add-on when I noticed that paste using middle click (a convenient feature of X11) does not work for input elements on the preferences page.

I checked that I can not paste to Firefox add-on as well. When I was going to submit a bug report I was (un)lucky enough to try another add-on that has no such problem. Trying to create a minimal example, I started to remove elements that I considered suspicious. At certain moment the state was the following: success of paste attempt depends on the open/close state of a <details> element when there are more than one <p> element inside and replacing <p> to <div> magically made paste working. Next step was that more than 10 (not e.g. 8 = 2^3) visible <p> elements breaks paste in Thunderbird but in Firefox the threshold is higher (~15) for some reason. That moment I had a hope that I can just replace all <p> by <div> as a workaround. Unfortunately it is overflow that blocks paste.

  • Load the test addon provided below as a temporary extension. Warning: do not use 100vh instead of 100em for the height attribute value.
  • Open add-on management tab and preferences for the add-on there.
  • Select some text in other application and try to paste it to the <textarea>
  • Try to paste when the <details> element is closed.

manifest.json

{
	"manifest_version": 2,
	"name": "bug-middle-click-options",
	"version": "0.1",
	"options_ui": { "page": "middle-click-options.html" }
}

middle-click-options.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Middle click paste problem (Linux, X11)</title>
  </head>
  <body>
    <h1>Middle click paste problem (Linux, X11)</h1>
    <div>Select something and try to paste using middle click:</div>
    <textarea rows="10"></textarea>
    <details open>
      <summary>Try to paste having this closed</summary>
      <div style="height: 100em; background: gray;">Content having large height.</div>
    </details>
  </body>
</html>

Actual results:

Middle click paste works only if the <details> element is closed (no overflow).

The same HTML file loaded as a regular page does not have any problem with pasting.

Expected results:

There is no usability problems with options_ui pages even when they are long enough, paste should just work.

See also the Bug #1770726 for a scrolling problem on the add-on preferences page.

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

Product: Firefox → WebExtensions

Hello,

I reproduced the issue on the latest Nightly (104.0a1/20220703213709), Beta (103.0b4/20220703190044) and Release (102.0/20220623063721) under Ubuntu 16.04 LTS. The issue cannot be reproduced on Windows 10 x64 as Windows does not support pasting using middle click feature as Linux.

With the attached extension loaded in the browsers, using the middle click to paste content in the designated text area will not work as long as the details element is opened. One it’s closed, pasting using middle click works fine.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: -- → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.