Closed Bug 1776843 Opened 2 years ago Closed 2 years ago

Investigate behavior on touch devices with Gecko-based non-Android OSs

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, task)

task

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: mbrodesser-Igalia, Assigned: edgar)

References

(Depends on 1 open bug)

Details

Attachments

(4 files)

OSs include: Linux, Windows, macOS. Excluded: iOS (since Firefox there isn't Gecko-based).

With current Nightly.

First, manually test it by:
a) Flipping the pref "dom.events.asyncClipboard.readText" to true.
b) Open https://jsfiddle.net/68hng59s/.
c) Touch the "X" button and check whether a "Paste" button occurs. Be aware of bug 1766803.
d) Touch the "Paste" button. An alert dialog with the clipboard's text content should appear.

Secondly, potentially write automated tests for it.

Severity: -- → N/A
Summary: Investigate behavior on touch devices → Investigate behavior on touch devices with Gecko-based non-Android OSs

Manually tested using the latest nightly (Fx104.0a1) on the following machines:

  • Intel Iris Xe: Windows 11 and Ubuntu 22.04 - Touching the 'Paste' button correctly prompts the clipboard text inside the alert box.
  • Yoga: Windows 10 ARM - Touching the 'Paste' button correctly prompts the clipboard text inside the alert box.

As far as I can tell, there are no touchscreen mac devices, except iOS devices.

Cristian: could you please repeat that, record the screen (the browser window suffices) and attach the recording here? Sorry that I didn't ask about that before. Either of the Windows systems plus Ubuntu suffices.

As far as I can tell, there are no touchscreen mac devices, except iOS devices.

Okay, thanks.

Flags: needinfo?(cristian.baica)
Attached video windows 11
Flags: needinfo?(cristian.baica)
Attached video ubuntu 22

Here are the recordings for Ubuntu 22.04 and Windows 11. I couldn't get the recording in one file, so I hope this is ok.

(In reply to Cristian Baica [:cbaica], Release Desktop QA from comment #4)

Created attachment 9284093 [details]
ubuntu 22

Here are the recordings for Ubuntu 22.04 and Windows 11. I couldn't get the recording in one file, so I hope this is ok.

Thanks, that's OK.

Interestingly, the "Paste" button's position is wrong in the Windows-recording (https://bugzilla.mozilla.org/attachment.cgi?id=9284092). @Cristian: in that recording, how many physical screens did you use?

CCing Neil, because that issue might be related to bug 1766803.

nsIDOMWindowUtils.getLastOverWindowMouseLocationInCSSPixels records real mouse event only, so we cannot use it on parent process even if Android. Child process can receive converted mouse event from touch event, it works well on child process only.

(In reply to Makoto Kato [:m_kato] from comment #7)

nsIDOMWindowUtils.getLastOverWindowMouseLocationInCSSPixels records real mouse event only, so we cannot use it on parent process even if Android. Child process can receive converted mouse event from touch event, it works well on child process only.

Makoto: do you mean nsIDOMWindowUtils.getLastOverWindowMouseLocationInCSSPixels provides no touch position if called from the parent process, but it does provide a touch position if called from the child process? If so, I don't understand why the manual test on Ubuntu 22 worked.

Flags: needinfo?(m_kato)

Makoto: do you mean nsIDOMWindowUtils.getLastOverWindowMouseLocationInCSSPixels provides no touch position if called from the parent process, but it does provide a touch position if called from the child process? If so, I don't understand why the manual test on Ubuntu 22 worked.

Yes on Android. Although I would like to use it on parent process, this value on parent process isn't updated as long as I test. I guess that this is as same as Windows. I guess that we dispatch converted event (original is touch event?) to child process, then it is recorded.

Although I have no test environment of GTK touch device, I guess that GTK dispatches anything mouse event? even if touch. But I am not sure.

Flags: needinfo?(m_kato)

(In reply to Makoto Kato [:m_kato] from comment #9)

Makoto: do you mean nsIDOMWindowUtils.getLastOverWindowMouseLocationInCSSPixels provides no touch position if called from the parent process, but it does provide a touch position if called from the child process? If so, I don't understand why the manual test on Ubuntu 22 worked.

Yes on Android. Although I would like to use it on parent process, this value on parent process isn't updated as long as I test.

Thanks, understood.

I guess that this is as same as Windows. I guess that we dispatch converted event (original is touch event?) to child process, then it is recorded.

I'm not familiar with the code responsible for that. Perhaps Edgar can provide some pointers and potentially context?

Although I have no test environment of GTK touch device, I guess that GTK dispatches anything mouse event? even if touch. But I am not sure.

Flags: needinfo?(echen)

(In reply to Makoto Kato [:m_kato] from comment #9)

I guess that this is as same as Windows. I guess that we dispatch converted event (original is touch event?) to child process, then it is recorded.

For Windows the synthesized mouse event is fired from APZ, and yes, it seems in parent process there is no synthesized mouse event, I filed bug 1778486.

Flags: needinfo?(echen)

(In reply to Mirko Brodesser (:mbrodesser) from comment #6)

@Cristian: in that recording, how many physical screens did you use?

Hey Mirko. Sorry for the late response. Only 1 physical screen was used in this test. I didn't mention anything about the position of the paste button, because, as you noted, it's related to bug 1766803.

I am going to write a test for touch input.

Assignee: nobody → echen

Depends on D152653

Attachment #9289930 - Attachment description: Bug 1776843 - Part 2: Add test for touch input; → Bug 1776843 - Part 2: Add clipboard contextmenu test for touch input;
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/11158f1eb5a0
Part 1: Move clipboard tests to dom/events/test/clipboard/; r=smaug
https://hg.mozilla.org/integration/autoland/rev/8fb31906e84c
Part 2: Add clipboard contextmenu test for touch input; r=smaug
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: