New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 599585 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 600416
issue 603372



Sign in to add a comment

MacViews: Can't drag&drop in/to text fields

Project Member Reported by rsesek@chromium.org, Mar 31 2016

Issue description

Version: 51.0.2695.1
OS: 10.11.4

What steps will reproduce the problem?
(0) Turn on chrome://flags/#mac-views-dialogs
(1) Go to a HTTP auth dialog sheet
(2) Select text in another application
(3) Drag the selected text into the username field
(4) Nothing happens
(5) In Chrome, type something in the username field
(6) Select a substring
(7) Try and drag and the substring
(8) Nothing happens

What is the expected output?
Text dragged from one application to the text field should be inserted. Text dragged within a field should be rearranged.

What do you see instead?
Unimplemented behavior.

Please use labels and text to provide additional information.

 
Components: Internals>Views
Labels: M-52
Status: Available (was: Untriaged)
This works for toolkit-views in Windows, so it's possible we just haven't implemented that bit of Drag & Drop yet (see also  Issue 543732 ).

Comment 2 by tapted@chromium.org, Apr 12 2016

Blocking: 600416

Comment 3 by tapted@chromium.org, Apr 14 2016

Labels: Phase1
Bulk-labelling blocking bugs for  Issue 603372 

Comment 4 by tapted@chromium.org, Apr 14 2016

Blocking: 603372

Comment 5 by tapted@chromium.org, Apr 14 2016

bulk-tagging Phase1 for M52
Owner: spqc...@chromium.org
Labels: -Hotlist-MacViews Proj-MacViews
Some thoughts, having recently done a bunch of refactoring in this area:

The "new" way of doing things is to put all the relevant information in an NSDraggingItem, and then pass that around. This is actually a nice simplification.

See ui/base/clipboard/clipboard_util_mac.mm for a bunch of utility methods I recently added, and some subtleties about UTIs.

Please avoid deprecated methods of interacting with the clipboard, including super old Mozilla code:
https://bugs.chromium.org/p/chromium/issues/detail?id=599264

Also, note that the new dragging API (beginDraggingSessionWithItems:event:source:) is asynchronous, whereas the deprecated one (dragImage:...) was synchronous.
Project Member

Comment 9 by bugdroid1@chromium.org, May 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6bdd9b835d5f6ef1ef209e301d02af2f0b12485e

commit 6bdd9b835d5f6ef1ef209e301d02af2f0b12485e
Author: spqchan <spqchan@chromium.org>
Date: Thu May 05 20:26:47 2016

Modify Pasteboard handling in OSExchangeData

BUG= 599585 

Review-Url: https://codereview.chromium.org/1947153003
Cr-Commit-Position: refs/heads/master@{#391894}

[modify] https://crrev.com/6bdd9b835d5f6ef1ef209e301d02af2f0b12485e/ui/base/dragdrop/os_exchange_data_provider_mac.mm

Labels: -M-52 M-53
Status: Started (was: Available)
https://codereview.chromium.org/1964283002/
Project Member

Comment 11 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cf5eeb5c035be5a986fa1a6488f2189e7aebe198

commit cf5eeb5c035be5a986fa1a6488f2189e7aebe198
Author: spqchan <spqchan@chromium.org>
Date: Fri Jun 03 21:17:19 2016

MacViews: Implemented Drag & Drop

Created a Drag & Drop client on Mac that bridges between the Views
and native OSX's drag and drop. This approach is based on the Aura
approach.

BUG= 599585 
TEST= Run the view unit test: DragDropClientMacTest

Review-Url: https://codereview.chromium.org/1964283002
Cr-Commit-Position: refs/heads/master@{#397801}

[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/base/mac/sdk_forward_declarations.h
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/base/BUILD.gn
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/base/dragdrop/drag_drop_types.h
[add] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/base/dragdrop/drag_drop_types_mac.mm
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/base/dragdrop/drag_utils.cc
[delete] https://crrev.com/d5c75af8c710870b5a5f4067f17d72b50a21cd2f/ui/base/dragdrop/drag_utils_aura.cc
[delete] https://crrev.com/d5c75af8c710870b5a5f4067f17d72b50a21cd2f/ui/base/dragdrop/drag_utils_mac.mm
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/base/dragdrop/os_exchange_data.h
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/base/dragdrop/os_exchange_data_provider_mac.h
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/base/dragdrop/os_exchange_data_provider_mac.mm
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/base/ui_base.gyp
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/views/cocoa/bridged_content_view.h
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/views/cocoa/bridged_content_view.mm
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/views/cocoa/bridged_native_widget.h
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/views/cocoa/bridged_native_widget.mm
[add] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/views/cocoa/drag_drop_client_mac.h
[add] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/views/cocoa/drag_drop_client_mac.mm
[add] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/views/cocoa/drag_drop_client_mac_unittest.mm
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/views/views.gyp
[modify] https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198/ui/views/widget/native_widget_mac.mm

Status: Fixed (was: Started)
Project Member

Comment 13 by bugdroid1@chromium.org, Jun 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/851eb42016eeca7ac932921164bb1fdb3a5844b3

commit 851eb42016eeca7ac932921164bb1fdb3a5844b3
Author: tapted <tapted@chromium.org>
Date: Mon Jun 06 00:49:47 2016

Add missing curlies in CocoaDragDropDataProvider

Otherwise the |data_| member is actually static (and causes a static
initializer).

BUG= 599585 
TBR=spqchan@chromium.org

Review-Url: https://codereview.chromium.org/2039723002
Cr-Commit-Position: refs/heads/master@{#397956}

[modify] https://crrev.com/851eb42016eeca7ac932921164bb1fdb3a5844b3/ui/views/cocoa/drag_drop_client_mac.mm

Status: Assigned (was: Fixed)
@spqchan: I can't get this to work correctly on the latest Canary. It works sometimes, but not consistently. Can you check once? Maybe this regressed? 
I can get it work on Canary. What are your reproduction steps?
Cc: karandeepb@chromium.org
+ karandeepb for Comment 14
Repro steps-
(0) Turn on chrome://flags/#mac-views-dialogs
(1) Go to a HTTP auth dialog.
(2) Select text in another application (Sublime Text in this case).
(3) Drag the selected text into the username field

Also, attaching a screencast for Canary. 
dragdrop2.mov
23.2 MB Download
Fixed the issue. Thanks for catching it!
Status: Fixed (was: Assigned)

Sign in to add a comment