Issue metadata
Sign in to add a comment
|
Drag/drop URLs not always working
Reported by
caseyhe...@gmail.com,
Jan 5 2018
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Steps to reproduce the problem: 1. Select some text containing a URL (such as one sent via a chat client) 2. Drag the text clipping to any part of Chrome that typically accepts dropped URLs 3. Be sad What is the expected behavior? Chrome should accept the dropped URL text and open it. What went wrong? Chrome did not accept the dropped URL text and therefore did not open it. Did this work before? Yes Unsure Chrome version: 63.0.3239.132 Channel: stable OS Version: OS X 10.13.2 Flash Version: It appears that when a URL is dropped in as a "bookmark", such as when you drag from the address bar in Safari to Chrome, things work correctly. The problem seems to primarily be when the URL is plain text (such as when sent in a chat client or when typed in a text editor).
,
Jan 8 2018
Your movie definitely shows the feature working as intended. I'm attaching a clip of it working incorrectly. Also, I'm not sure if it makes a difference, but I'm running the latest version of Mac OS (10.13.2). I noticed that you're testing it on the previous version (10.12).
,
Jan 8 2018
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 9 2018
[Mac triage] It looks like this is a bug in WebView (which Adium uses) which is fixed in WKWebView.
If I create a Swift playground with this code:
import Cocoa
import PlaygroundSupport
import WebKit
let webView = WebView(frame: NSRect(x: 0, y: 0, width: 200, height: 100))
webView.mainFrame.loadHTMLString("<a href=\"http://apple.com\">apple.com</a>", baseURL: nil)
PlaygroundPage.current.liveView = webView
…then dragging the link behaves the same was as Adium. If I replace the two lines in the middle with this:
let webView = WKWebView(frame: NSRect(x: 0, y: 0, width: 200, height: 100))
webView.loadHTMLString("<a href=\"http://apple.com\">apple.com</a>", baseURL: nil)
…then the drag works.
I used Clipboard Viewer (which comes with Additional Tools for Xcode) to see the content of the drag pasteboard after each attempt. The difference is that both web views include WebURLsWithTitlesPboardType in the drag, but the one from WebView is empty. When a drag contains WebURLsWithTitlesPboardType, Chrome goes with it and doesn't fall back to the other types on the pasteboard:
https://chromium.googlesource.com/chromium/src/+/13b9ac02d3537053c889ceea6a38d622ecca96b0/third_party/mozilla/NSPasteboard%2BUtils.mm#182
So, this is a macOS/WebView bug, but it probably won't be fixed since its use WKWebView is preferred going forward. Chrome can work around the bug by trying other types on the pasteboard if it doesn't get any URLs from this one.
,
Jan 9 2018
If it helps justify adding a workaround to Chrome, I've noticed the issue with many different applications, not just Adium. So I don't think it would be a huge leap to see this as a bug with an even larger footprint that affects a larger number of users.
,
Jan 16 2018
,
Jan 29 2018
,
Feb 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/40d081b178a645b1221526d6bc2968975addc8c1 commit 40d081b178a645b1221526d6bc2968975addc8c1 Author: Sidney San Martín <sdy@chromium.org> Date: Thu Feb 01 01:21:28 2018 When extracting URLs from a pasteboard, keep going if WebURLsWithTitlesPboardType doesn't yield anything. This fixes an issue where drags from a legacy macOS WebView fail because they populate WebURLsWithTitlesPboardType in the pasteboard without any content. (It also looks like there was a crash here if the pasteboard contained an empty list of URLs.) Bug: 799533 Change-Id: I034bcc5bb9cedb86b5cca95601e7bd560eb45965 Reviewed-on: https://chromium-review.googlesource.com/895924 Commit-Queue: Sidney San Martín <sdy@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/master@{#533510} [modify] https://crrev.com/40d081b178a645b1221526d6bc2968975addc8c1/third_party/mozilla/NSPasteboard+Utils.mm [modify] https://crrev.com/40d081b178a645b1221526d6bc2968975addc8c1/third_party/mozilla/README.chromium
,
Feb 2 2018
Tried testing the issue again on Mac OS 10.13.3 on the reported version 63.0.3239.132 and unable to reproduce the issue. No issues are seen on dragging and dropping a URL from a Hangout chat box. As we are not able to reproduce this issue on the reported version as per comment #2, it is not possible to verify the fix on 66.0.3337.0. Hence requesting caseyheney@ to please check this issue on the latest Canary 66.0.3337.0 and help us in verifying if the fix is working as intended or not? Link for downloading latest Canary - https://www.chromium.org/getting-involved/dev-channel. Thanks..
,
Feb 2 2018
// Correction in Comment #9. As Canary 66.0.3337.0 is not available today, request you to please verify this issue on the next available Canary. The Fix is not yet landed on today's Canary 66.0.3336.5 as well.
,
Feb 5 2018
It's on Canary now and works for me. Could you see if it's fixed for you when you have a chance?
,
Feb 5 2018
It looks like the issue has been half fixed. Drag and drop works in the tab area and the address bar now, but not in the window body or dock icon.
,
Feb 5 2018
I think this is a separate issue — in the new video, you drag the text "apple.com" (which isn't a link) from BBEdit into Chrome. Safari, for comparison, accepts this drag and does a web search for "apple.com". Maybe Chrome should do this too, but it'd be more of a feature request. Could you try it with Adium again? The original problem seems to be specific to content in a WebView, like Adium chats.
,
Feb 5 2018
Ah yes, dragging links from Adium works "correctly" in all accounts. Looks good to me.
,
Feb 5 2018
Cool, thanks for checking. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by sc00335...@techmahindra.com
, Jan 8 2018Labels: Needs-Triage-M63 Triaged-ET Needs-Feedback
3.6 MB
3.6 MB View Download