Closed Bug 1586471 Opened 6 years ago Closed 2 years ago

Support for drag and drop (implement nsDragService for GeckoView)

Categories

(GeckoView :: General, enhancement, P5)

71 Branch
Unspecified
All
enhancement

Tracking

(relnote-firefox 124+, firefox124 fixed)

RESOLVED FIXED
124 Branch
Tracking Status
relnote-firefox --- 124+
firefox124 --- fixed

People

(Reporter: tigeroakes, Assigned: m_kato)

References

(Blocks 3 open bugs)

Details

(Keywords: dev-doc-needed)

Attachments

(4 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

When filling in web forms/payment pages a user may want to use split screen mode and drag a text field from one app into the relevant field on the website.

For example dragging and dropping from 1Password, as shown on this page into Chrome: https://support.1password.com/getting-started-android/#drag-and-drop-to-fill-in-other-apps

Fenix bug: https://github.com/mozilla-mobile/fenix/issues/4004

This is a user requested feature. Waiting until it becomes a priority.

Priority: -- → P5
Summary: Support for drag and drop from other apps → Support for drag and drop (implement nsDragService for GeckoView)
Severity: normal → S3

Enhancements should have severity N/A.

Severity: S3 → N/A
Blocks: 1764177
Blocks: 1587995
Duplicate of this bug: 691284

The following field has been copied from a duplicate bug:

Field Value Source
Status NEW bug 691284

For more information, please visit auto_nag documentation.

Status: UNCONFIRMED → NEW
Ever confirmed: true

I have a WIP for it. Reviewable patch series are soon.

Assignee: nobody → m_kato

Main thread and APZ controller thread are difffent on GeckoView. Some
drag events cannot be converted to InputData and aren't handled by APZ.

So we need consider drag events more for GeckoView.

This implementation supports

  • HTML drag & drop API.
  • Drop and drop for text/plain or text/html from/to external application.

Depends on D197329

The dropped item is set on drop event handler in Android. Current
Gecko's implementation caches dropped item as DataTransfer when any
drag events are fired. It will works on desktop platform, but doesn't
on GeckoView. Even if drop item is set by handling drop event,
DataTransfer's cache isn't refreshed.

So if drop event is received, we re-fill DataTransfer on GeckoView.

Depends on D197330

GeckoView's drag threshold is large and mochitest runs on mobile
viewport.

So I would like to adjust this value to run drag and drop tests on
GeckoView.

Depends on D197331

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/a2758c9c19ec Part 1. Handle WidgetDragEvent by DispatchInputEvent. r=botond https://hg.mozilla.org/integration/autoland/rev/0109b64f9e84 Part 2. Implement nsDragService on GeckoView. r=geckoview-reviewers,amejiamarmol https://hg.mozilla.org/integration/autoland/rev/610bc3316bee Part 3. Allow to drop data from external application on GeckoView. r=dom-core,geckoview-reviewers,amejiamarmol,edgar https://hg.mozilla.org/integration/autoland/rev/8af82ec7ea26 Part 4. Fix drag threshold for mochitests. r=masayuki
Keywords: dev-doc-needed

:m_kato is this something you would want to nominate for fx124 release notes?

Flags: needinfo?(m_kato)

Release Note Request (optional, but appreciated)
[Why is this notable]:
Firefox for Android supports HTML drop and drop API

[Suggested wording]:
Firefox for Android supports HTML drop and drop API when using mouse. Also, it accepts plain text or HTML text by drop operation from external application.

[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?
Flags: needinfo?(m_kato)

I assume you meant drag and drop?

Added to Fx124 nightly notes as well as the draft for the final release notes
https://www.mozilla.org/en-US/firefox/124.0a1/releasenotes/

Firefox for Android now supports HTML drag and drop API when using a mouse. Also, it accepts plain text or HTML text by drop operation from external applications.

Blocks: 1877466

(In reply to Dianna Smith [:diannaS] from comment #15)

I assume you meant drag and drop?

Ah, yes. This is typo. Thank you for correction.

Regressions: 1878793
Duplicate of this bug: 1809991
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: