Hello

In old browsers we are not able to drag and drop atoms.
In field, we get the error message 'you can't drop a ressource of type undefined' in this field.
In CKEditor we get the plain HTML stuff displayed

Can you reproduce it ??

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DeFr’s picture

I've just pushed f43b8f8 which should make Atom reference fully functional, and include the SAS representation in the WYSIWYG stuff, which make the atom display after the content is saved.

Still looking into wether it's possible to intercept the drop event on the RTE iframe and replace the SAS with the RTE representation straight away.

Mindless-dupe’s picture

Hello

With your patch we can use the atom reference. Thanks !
But the the WYSIWIG is still buggy. After saving the content, the atom is displayed but the markup is wrong and we are not able to edit the atom properties, which is very annoying.

Withe IE, i get following markup

<p><!-- scald=65:sdl_editor_representation --></p>
<div class="image"><img alt=""
src="http://future.local.com/sites/default/files/styles/medium/public/atoms/images/047159-000_natur-newyork_16_.jpg?itok=jobVWeOv"
typeof="Image" /></div>
<!-- END scald=65 -->

With Chrome, i get this (which is fully functional)

<div class="dnd-atom-wrapper type-image context-sdl_editor_representation"
contenteditable="false">
<div class="dnd-drop-wrapper"><!-- scald=106:sdl_editor_representation -->
<div class="image"><img alt=""
src="http://future.local.com/sites/default/files/styles/medium/public/atoms/images/bildschirmfoto_2013-04-15_um_12.42.51.png?itok=bDpY8bNb"
typeof="Image" /></div>
<!-- END scald=106 --></div>
</div>
DeFr’s picture

Yup, that's the second paragraph of the comment #1, but it probably wasn't very explicit ;-)

What's included in the RTE right now is the SAS wrapped in two <div>s (something like <div class='dnd-atom-wrapper'><div class='dnd-drop-wrapper'>[scald=65:sdl_editor_representation]</div></div>). IE only allows us to put in a purely textual representation in the drag'n'drop dataTransfer object, so ideally, they should be inserted somewhere else. A possible hook point would be when the atom is dropped in the RTE, but it's trickier that it should be because of another IE specifity (the drop event doesn't bubble up in the DOM tree, even though it's supposed to…)

Mindless-dupe’s picture

OK thanks !
Does that mean that Atom drag and drop in CKEditor never really worked with IE ?

jcisio’s picture

Title: Drag and drop not working by IE8 / Firefox 3.2 » Drag and drop not working with IE

It didn't work with IE because IE was not a target browser.

Commit ff92f1e makes it work with IE9+. There is a little hope to see if it could work with IE8, so I leave this issue open.

jcisio’s picture

http://stackoverflow.com/questions/16613142/ie8-drop-event-does-not-work... and Reinmar is a CKEditor core developer. I didn't have time to work on it, but post this link to keep people informed and not have valueable information lost.

bdecarne’s picture

FileSize
760 bytes

Hi !

Drag & drop didnt work for me in CKEditor for ie10. This patch correct this behaviour. But ie8 is still buggy :(

jcisio’s picture

Thanks, patch #7 committed. #dcparis13

jcisio’s picture

Title: Drag and drop not working with IE » Drag and drop not working with IE8 and below
specky_rum’s picture

Drag and drop doesn't appear to work in IE8, IE9 or IE10 on the scald galaxy distribution. In most cases when you drag an image from the scald sidebar to the content body section it shows the not allowed mouse icon and won't let you do it at all. In other cases it inserts something like: [scald=2:sdl_editor_representation] in there which once saved works fine and you can even see it in the editor after it has saved, just not when you first insert it.

To get this behaviour I installed a clean scald galaxy instance and added users, that's it! It all works beautifully in FF and Chrome.

kingfisher64’s picture

I simply can't get drag n drop atoms to work. The image displays when I'm in the text area in the backend however as soon as I go back to the front end to view the content it's output as:

[scald=6:sdl_editor_representation] , etc

I've tried the latest dev version, tried with various wysiwyg's running drupal 7.23 in firefox 24 & latest chrome. I've checked the text formats to see if there is a scald filter to interpret atom. After quite a few hours of trying to find a solution - no luck.

I've had to go back to media (regrettably) as I've honestly no clue how to fix this? Am I doing something wrong or is it simply a case of at present scald is having drag n drop issues with atoms? When trying galaxy out there was no issues like this.

Many thanks for any help received :)

jcisio’s picture

#11 try Scald Galaxy or read documentation to know how to properly configure the module.

jcisio’s picture

Finally I think we should look at Draggable (jQuery UI), or even use it, to improve compatibility.

jcisio’s picture

Issue tags: +UX improvement

Tagging.

slybud’s picture

Opening another discussion here : https://drupal.org/node/2073413 allows now IE8 users to sue the library by doubleclicking or hitting an "insert" link to embed media => I think it's enough, especially on the day Google Apps has decided to drop IE9 support :)

kingfisher64’s picture

@ #12 - must have been v tired asking that question. Just come back now to look at scald and it's all working fine including drag n drop in body.

The only thing I've done different between now and then is update to the latest dev.

Many thanks for a great module. :)

jcisio’s picture

I've changed the way how DnD works in #2013823: Default context per field. I think it should work with IE8 (not tested yet).

dDoak’s picture

Issue summary: View changes
FileSize
3.92 KB

Event dragstart does not appear to be working on IE.
Here is a patch that handle Drag&Drop for wysiwyg.

jcisio’s picture

Status: Active » Needs review

The last submitted patch, 7: scald-fixIE-1995238-7.patch, failed testing.

jcisio’s picture

Status: Needs review » Needs work

Thanks for the patch. Here is a summary of my reviews (plus comments from defr on IRC):

- Better way to detect IE8 than useragent (maybe that the feature detect (like in Modernizr) for "draggable" will work?).;
- The feature "double click to insert" works for IE, too.
- The way to insert an atom to the wysiwyg editor is quite literal. We do something like that in insertAtom (in dnd-library.js) that could take as an example.

kimberlydb’s picture

This patch doesn't work for me, on any version of IE (emulated) - still always shows up as "[scald=2:sdl_editor_representation]" instead of an image.

The workaround of saving and coming back does work, but it's not the greatest solution at the moment. I'd rather not have to go back to Media, but IE is the main browser used by our client.