WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
6839
shouldInsertNode delegate returning NO shouldn't necessarily cancel a drag and drop
https://bugs.webkit.org/show_bug.cgi?id=6839
Summary
shouldInsertNode delegate returning NO shouldn't necessarily cancel a drag an...
Duncan Wilcox
Reported
2006-01-26 07:20:13 PST
Editing delegate methods exist both to forbid some behaviours and to replace built-in behaviours with more application specific ones. Specifically, when performing a drag and drop into an editable area, this delegate method will be called: - (BOOL)webView:(WebView *)webView shouldInsertNode:(DOMNode *)node replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action if the delegate returns NO, the drop won't be accepted and the system will animate the dropped object returning where it came from. This is the correct behaviour if the delegate wants to forbid the drop, but if the delegate wants to replace it with a different one, in fact it does want the drop to be accepted, albeit providing its own custom implementation of the functionality. The delegate method above should be extended to reflect this.
Attachments
Add attachment
proposed patch, testcase, etc.
Justin Garcia
Comment 1
2006-02-13 23:01:38 PST
I think the way to go here is to add replaceDOMRangeWithNode:. We currently only provide a replaceSelectionWithNode:, which makes it cumbersome to do what Duncan describes w/o changing the current selection. This should be a straightforward fix.
Ahmad Saleem
Comment 2
2022-12-16 16:29:21 PST
I think it is referring to following -
https://github.com/WebKit/WebKit/blob/689b0ba375c8ad009024dac56d3d7713c6f5b7c6/Source/WebCore/loader/EmptyClients.cpp#L265
^ Do we need to need to extend the functionality or another functionality is now available to provide similar "replacement" experience based on drag and drop?
Ryosuke Niwa
Comment 3
2022-12-16 16:46:32 PST
This is won't fix at this point. WebKitLegacy has been deprecated.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug