Last modified: 2014-07-08 20:59:58 UTC
Dragging and dropping text (as an alternative to keyboard or context menu copy and paste commands) inside CodeEditor does not work. Since this is basic functionality in every other editor I know this should also be supported by CodeEditor.
This works for me in the beta at least: http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Module:HtmlBuilder&action=edit It might be that the reporter is actually talking about VisualEditor, which indeed does not seem to support drag and drop of text.
No this definitely is about CodeEditor! And while I just wanted to write that this is definitely not fixed I just realized during some additional testing that it actually is working... but only somehow. I don't know if I have a very special way of dragging/dropping but actually dragging only starts after a small delay (note that after clicking highlighted text the cursor only changes to the move cursor after approx. 100 ms). If you start moving the mouse before it will just create a new selection. However when normally dragging/dropping I start moving the mouse right away. Moving the mouse over the highlighted text, clicking, then *waiting* and only after waiting beginning to move the mouse is just counterintuitive and different from every other program I know. Since it therefore doesn't seem to be specific to MediaWiki's implementation (Ace's web demo "works" exactly the same) I'll report a bug for Ace directly however. I'll update this bug with the respective info then.
Upstream bug is https://github.com/ajaxorg/ace/issues/1879 Let's hope it is easy fixable and not some sort of technical limitation.
Thank you for clarifying Eduard !
So as answered in the linked upstream bug it seems this delay is actually configurable. Nighwing wrote: You can disable dragDelay by setting editor.setOption("dragDelay", 0) Can somebody familiar with CodeEditor implement this? I can't see a reason to keep the delay at this point.
Change 121044 had a related patch set uploaded by TheDJ: Remove CodeEditor delay in drag & drop of text https://gerrit.wikimedia.org/r/121044
i still need to wrap this in some platform dependent if constructs.
https://github.com/ajaxorg/ace/pull/2012
Very nice! Thank you for the submission.
Has been fixed upstream (thanks Derk-Jan): https://github.com/ajaxorg/ace/commit/63f43da96a1bd2b9894c371fb0feed7e38ef34d6 Let's wait until this fix makes it into MediaWiki's CodeEditor extension...
Change 121044 abandoned by TheDJ: Remove CodeEditor delay in drag & drop of text Reason: Fix added upstream. https://gerrit.wikimedia.org/r/121044
Fixed upstream. I'll schedule an update of the code sometime next week.
Change 144780 had a related patch set uploaded by TheDJ: Ace: Update to 08-07-2014 https://gerrit.wikimedia.org/r/144780