Closed Bug 1779269 Opened 2 years ago Closed 2 years ago

Can't copy from a textarea with disabled attribute on deepl.com, mobile only

Categories

(Core :: DOM: Selection, defect, P3)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
104 Branch
Webcompat Priority P2
Tracking Status
firefox104 --- fixed

People

(Reporter: ksenia, Assigned: TYLin)

References

(Blocks 1 open bug, )

Details

(Keywords: webcompat:needs-contact)

Attachments

(2 files)

This was originally reported in https://github.com/webcompat/web-bugs/issues/101491.

  1. To reproduce, visit https://www.deepl.com/translator#en/ro/bug in Firefox on mobile and long tap on the translation result (bug in Romanian) to attempt to copy text.

Expected:
Context menu is shown with an option to copy text.

Actual:
No context menu is displayed, therefore it's impossible to copy text through this interaction.

(the site is offering a "copy" button below the field, so it's possible to work around the issue)

Attached file 101491.html

I've attached a reduced test case. The issue is only reproducible on mobile.

It's looks the same as bug 253870, which is resolved, and it's possible to copy on desktop, but looks like it's still an issue on mobile?

Webcompat Priority: --- → ?
See Also: → 253870

GV shows action menu by accessiblecaret event. I guess that this may accessiblecaret issues since longtap doesn't show its caret even if Surface Pro. Chrome/Android shows accessiblecaret on this situation.

TYLin, do you know why accessible caret isn't shown by comment #1 sample? It seems to be different behavior with Chrome/Android.

Component: DOM: Editor → DOM: Selection
Flags: needinfo?(aethanyc)

I can reproduce this on desktop with layout.accessiblecaret.enabled=true and layout.accessiblecaret.hide_carets_for_mouse_input=false. The AccesibleCaret doesn't show on the disabled <textarea> when selecting a text with mouse. Debugging ...

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Flags: needinfo?(aethanyc)

A disabled form controls cannot be focused, and its frame selection is different
from the one for not-editable content. Use GetLastFocusedFrameSelection() (added
in Bug 253870) to get the correct frame selection that is visible to the user.

Add some basic tests for disabled <textarea> such as long pressing to select,
dragging, etc. They should behave the same as normal <textarea>.

Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/429187de34ff
Fix AccessibleCaret's display on disabled form controls. r=emilio,webdriver-reviewers,whimboo

Backed out for causing geckoview-junit failures

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.SelectionActionDelegateTest#compareClientRect[#input] | java.lang.AssertionError: Selection rect is not at expected location. aRectF(8.0, 8.0, 8.0, 30.0) bRectF(28.0, 49.75, 28.0, 71.75)
Flags: needinfo?(aethanyc)
Severity: -- → S3
Priority: -- → P3

WebCompat P2, but we should also reach out to ask them why they're using disabled instead of readonly.

Webcompat Priority: ? → P2

Fixed the geckoview-junit failures in the latest revision.

Flags: needinfo?(aethanyc)
Pushed by tlin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5f4c6d247cd1
Fix AccessibleCaret's display on disabled form controls. r=emilio,webdriver-reviewers,whimboo,geckoview-reviewers,m_kato
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Regressions: 1780903
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: