Opened 10 years ago
Closed 10 years ago
#27880 closed defect (bug) (fixed)
Drag and Drop Media prevents Drag and Drop Text
Reported by: | Ipstenu | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.9.1 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Editor | Keywords: | fixed-major commit has-patch |
Focuses: | Cc: |
Description
Related to #27465
Drag-and-drop text (that is selecting text and dragging it to the text editor window) no longer works in WordPress due to the new Drag & Drop Media feature. This is the case in the HTML and Visual editors. This has been reported in the WordPress.org forums by a few people.
https://wordpress.org/support/topic/text-editor-ruined-in-39
Attachments (3)
Change History (16)
#3
follow-up:
↓ 6
@
10 years ago
It's hard to gauge. I think it's one of those 'Heavily used by people who knew about it' features. I find it useful in forums or tickets when I want to quote, but I'm really a little surprised it's in-use for writing posts.
Would it be possible to have an option (define option, not a check box) to allow people to turn off the whole-page drag/drop to get it back? That MIGHT get us a better idea of how it's used.
#4
@
10 years ago
Agreeing with Ipstenu, would it make sense to add a filter for the default args for the Edit Posts editor and suggest a plugin for the previous behavior to save the performance hit of isDraggingFile()
?
Attaching patch and example plugin in a moment.
#5
@
10 years ago
Not sure if another filter is needed there. If you want to disable drag/drop uploading from a plugin, this should do it:
add_action( 'after_wp_tiny_mce', 'my_disable_ddupload' ); function my_disable_ddupload() { ?> <script> if ( typeof tinyMCEPreInit !== 'undefined' ) { delete tinyMCEPreInit.dragDropUpload; } </script> <?php }
#6
in reply to:
↑ 3
@
10 years ago
I'm not even sure I am allowed to post here as I am in no way involved in WP development but I was following a link from a thread I started on this subject.
I think that to be a little surprised that drag and drop is used in writing posts kind of suggests a narrow scope of how WP is used and that it is only used for blogging. As somebody else said, I used it to quote chunks of text and YouTube descriptions of videos which I embed. It saves a lot of time when one spends a couple of hours per day posting and the extra time spent soon mounts.
I definitely cannot drag and drop from one browser to another - at least not from Safari to Firefox because that's how I first discovered the problem. I can sometimes (but I haven't discovered the necessary conditions to do so) drag and drop from Mac TextEdit to Safari but only if I place the cursor at the text insertion point. It may be that text must have already been inserted but Drag and Drop from TextEdit to Safari isn't something I do very often - it's usually Safari-Firefox or Safari-Safari, neither of which work.
Replying to Ipstenu:
It's hard to gauge. I think it's one of those 'Heavily used by people who knew about it' features. I find it useful in forums or tickets when I want to quote, but I'm really a little surprised it's in-use for writing posts.
Would it be possible to have an option (define option, not a check box) to allow people to turn off the whole-page drag/drop to get it back? That MIGHT get us a better idea of how it's used.
This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.
10 years ago
#8
@
10 years ago
- Keywords has-patch needs-testing added
27880.2.diff fixes it by looking at what is being dragged. It adds a bit of overhead especially while dragging in TinyMCE as it passes the normalized jQuery event to the parent document, but that is roughly the equivalent of attaching the events with jQuery in the iframe.
Not sure how common is this. Testing on Win7, it will only let me drag selected text from one web browser to another, not from a text editor. It's quite inconvenient to drag too.
To fix, seems we will have to bring back something like
isDraggingFile()
from https://core.trac.wordpress.org/attachment/ticket/19845/19845.8.diff and throttle it down as there are some performance issues. Or maybe set adraggingFile
var the first time we see adrag
event and reset it when the dragging has finished.