Closed Bug 1748417 Opened 3 years ago Closed 3 years ago

[Bug]: "Paste as plain text" in search box is redundant/confusing and has no effect

Categories

(GeckoView :: General, defect)

Unspecified
Android
defect

Tracking

(firefox98 fixed)

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: petru, Assigned: m_kato)

References

Details

Attachments

(1 file)

From github: https://github.com/mozilla-mobile/fenix/issues/23047.

Steps to reproduce

  1. Navigate to https://archive.org
  2. Select "Internet Archive" at the beginning of the paragraph "Internet Archive is a non-profit [...]" then copy to the clipboard.
  3. Long-tap in the "Search" box below that paragraph.

Expected behaviour

"Paste" would be the only option shown.

Actual behaviour

"Paste" and "Paste as plain text" are shown. If "Paste as plain text" is selected, nothing is pasted.
<img src="https://user-images.githubusercontent.com/336433/147991822-c7dd84fd-54d7-4b1b-8229-6a0ccb6ee78b.png" alt="Screenshot of "Paste" and "Paste as plain text" options" style="max-width: 100%" height="600" width="270">

Device name

Google Pixel 5a

Android version

Android 12 (SQ1A.211205.008)

Firefox release type

Firefox Nightly

Firefox version

97.0a1 (Build #2015855307)

Device logs

No response

Additional information

No response

Change performed by the Move to Bugzilla add-on.

See Also: → 1740414
Assignee: nobody → m_kato

This textbox seems to be in shadow root, so event.target.activeElement is custom element. not focused element. https://searchfox.org/mozilla-central/rev/6eab79ab46c362b0191c4dad919f4cea2d6efb40/mobile/android/actors/SelectionActionDelegateChild.jsm#134 should consider this.

When content uses Shadow DOM, event.target.activeElement is custom element,
not focused element. So we use nsIFocusManager to get real focused element.

Also, "Select All" has same issue. If focused element is into shadow root, its
menu doesn't appear.

Attachment #9257972 - Attachment description: Bug 1748417 - "Paste as plain text" shouldn't show on <input> element into shadow root. r=#geckoview-reviewers → Bug 1748417 - "Paste as plain text" shouldn't be shown on <input> element into shadow root. r=#geckoview-reviewers
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/d0e5edd6fb25 "Paste as plain text" shouldn't be shown on <input> element into shadow root. r=geckoview-reviewers,calu
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: