Changes between Version 4 and Version 5 of Ticket #11526, comment 3


Ignore:
Timestamp:
Feb 12, 2014, 10:43:22 AM (11 years ago)
Author:
Piotrek Koszuliński
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11526, comment 3

    v4 v5  
    1 = Testing environment =
     1= 1. Testing environment =
    22I tested Drag & Drop and Copy & Paste I the following cases. You can find scripts used for testing in the attachment.
    3 == HTML from outside of editable area
     3=== HTML from outside of editable area
    44Source HTML:
    55{{{
     
    88<p>Aliquam <b>mi est</b>, interdum
    99}}}
    10 == HTML from inside of editable area
    11 
    12 As above.
    13 
    14 == Text from textarea
     10=== HTML from inside of editable area
     11
     12As above.
     13
     14=== Text from textarea
    1515Textatea in the same document as content editable area. Textarea contains:
    1616{{{
    1717foo bar
    1818}}}
    19 == 2 images from system file browser
     19=== 2 images from system file browser
    2020Because file API is based on `files` array multiple file should works the same way as one file, but if it is not possible to drop/paste two files I also tested one file.
    2121
    22 == 2 text files from system file browser
    23 As above.
    24 
    25 == Part of image from MS Paint
     22=== 2 text files from system file browser
     23As above.
     24
     25=== Part of image from MS Paint
    2626Part of png/jpeg file opened with MS Paint. It is not possible to drag part of the image from Paints editing area so only copy and paste is possible. The same for Gimp.
    2727
    28 == Part of document from MS Word/Wordpad
     28=== Part of document from MS Word/Wordpad
    2929Document containing formatted (bolded) text and image:
    3030{{{
     
    3434}}}
    3535
    36 == Text from notepad
     36=== Text from notepad
    3737Like for Paint D&D is not possible.
    3838
    39 == Text from pdf (Adobe Reader XI)
     39=== Text from pdf (Adobe Reader XI)
    4040Like for Paint D&D is not possible.
    4141
    42 = Blink - Drag & Drop =
     42= 2. Results: Blink =
     43
     44== 2.1. Drag & Drop ==
     45
    4346Tested with Chrome (version 32) and Opera (version 19).
    4447
    45 ===== HTML from outside of editable area
     48=== HTML from outside of editable area
    4649Data in two types:
    4750- `text/plain`: correct plain text
     
    5659<p style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="Apple-converted-space"> </span>eu odio.</p><img src="http://ckeditor.dev/samples/local/crayons.jpg" width="30" height="30" style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;"></span><p style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Aliquam<span class="Apple-converted-space"> </span><b>mi est</b>, interdum</p>
    5760        }}}
    58 ===== HTML from inside of editable area
    59 As above.
    60 ===== Text from textarea
    61 Data in `text/plain`.
    62 ===== 2 images from system file browser
     61=== HTML from inside of editable area
     62As above.
     63=== Text from textarea
     64Data in `text/plain`.
     65=== 2 images from system file browser
    6366'''Chrome''': Three items:
    6467- `text/uri-list` with file paths
     
    7780}}}
    7881
    79 ===== 2 text files from system file browser
    80 As above.
    81 
    82 ===== Part of image from MS Paint
    83 D&D is not possible.
    84 
    85 ===== Part of document from MS Word/Wordpad
     82=== 2 text files from system file browser
     83As above.
     84
     85=== Part of image from MS Paint
     86D&D is not possible.
     87
     88=== Part of document from MS Word/Wordpad
    8689- `text/plain`: correct plain text
    8790{{{
     
    129132}}}
    130133
    131 ===== Text from notepad
    132 D&D is not possible.
    133 
    134 ===== Text from pdf (Adobe Reader XI)
    135 D&D is not possible.
    136 
    137 
    138 == Blink - Copy & paste ==
     134=== Text from notepad
     135D&D is not possible.
     136
     137=== Text from pdf (Adobe Reader XI)
     138D&D is not possible.
     139
     140
     141== 2.2. Copy & paste ==
    139142For Copy and Paste `Clipboard` object is available as `evt.clipboardData`, not `evt.dataTranfer`.
    140143
    141 ===== HTML from outside of editable area
     144=== HTML from outside of editable area
    142145The same as D&D.
    143146
    144 ===== HTML from inside of editable area
     147=== HTML from inside of editable area
    145148The same as D&D/above.
    146149
    147 ===== Text from textarea
     150=== Text from textarea
    148151The same as D&D.
    149152
    150 ===== 2 images from system file browser
     153=== 2 images from system file browser
    151154No files nor items available in `clipboardData`.
    152155
    153 ===== 2 text files from system file browser
     156=== 2 text files from system file browser
    154157No files nor items available in `clipboardData`.
    155158
    156 ===== Part of image from MS Paint
     159=== Part of image from MS Paint
    157160One item which is file in "image/png" type (it does not matter if the source file was png, jpg or bmp).
    158161
    159162For native drop I get nothing.
    160163
    161 ===== Part of document from MS Word/Wordpad
     164=== Part of document from MS Word/Wordpad
    162165Data in three formats:
    163166- `text/plain`,
     
    170173}}}
    171174
    172 ===== Text from notepad
    173 Data in `text/plain`.
    174 
    175 ===== Text from pdf (Adobe Reader XI)
     175=== Text from notepad
     176Data in `text/plain`.
     177
     178=== Text from pdf (Adobe Reader XI)
    176179Data in two formats:
    177180- `text/plain`,
     
    183186
    184187
    185 = Firefox - Drag & Drop =
    186 New D&D API is not available, only old one.
     188= 3. Results: Firefox =
     189
     190== 3.1. Drag & Drop
     191
     192New D&D API is not available.
    187193Tested with version 26.
    188194
    189 ===== HTML from outside of editable area
     195=== HTML from outside of editable area
    190196Data in four types
    191197- `text/_moz_htmlcontext`,
     
    207213}}}
    208214
    209 ===== HTML from inside of editable area
    210 As above.
    211 
    212 ===== Text from textarea
    213 Data in `text/plain`.
    214 
    215 ===== 2 images from system file browser
     215=== HTML from inside of editable area
     216As above.
     217
     218=== Text from textarea
     219Data in `text/plain`.
     220
     221=== 2 images from system file browser
    216222`types` contains 3 types:
    217223 - "application/x-moz-file",
     
    221227`files` contains 2 `file` elements.
    222228
    223 ===== 2 text files from system file browser
    224 As above.
    225 
    226 ===== Part of image from MS Paint
    227 D&D is not possible.
    228 
    229 ===== Part of document from MS Word/Wordpad
     229=== 2 text files from system file browser
     230As above.
     231
     232=== Part of image from MS Paint
     233D&D is not possible.
     234
     235=== Part of document from MS Word/Wordpad
    230236Data in `text/plain`:
    231237{{{
     
    235241}}}
    236242
    237 ===== Text from notepad
    238 D&D is not possible.
    239 
    240 ===== Text from pdf (Adobe Reader XI)
    241 D&D is not possible.
    242 
    243 = Firefox - Copy & paste =
     243=== Text from notepad
     244D&D is not possible.
     245
     246=== Text from pdf (Adobe Reader XI)
     247D&D is not possible.
     248
     249== 3.2. Copy & paste ==
    244250
    245251for Copy and Paste `Clipboard` object is available as `evt.clipboardData`, not `evt.dataTranfer` (as in Chrome).
    246252
    247 ===== HTML from outside of editable area
     253=== HTML from outside of editable area
    248254As D&D.
    249255
    250 ===== HTML from inside of editable area
     256=== HTML from inside of editable area
    251257As D&D.
    252258
    253 ===== Text from textarea
    254 Data in `text/plain`.
    255 
    256 ===== 2 images from system file browser
     259=== Text from textarea
     260Data in `text/plain`.
     261
     262=== 2 images from system file browser
    257263`types` contains 2 types:
    258264- `application/x-moz-file`,
     
    261267`files` contains '''only 1''' `file` elements.
    262268
    263 ===== 2 text files from system file browser
    264 As above.
    265 
    266 ===== Part of image from MS Paint
     269=== 2 text files from system file browser
     270As above.
     271
     272=== Part of image from MS Paint
    267273No data types nor files. But you can paste image using naive paste:
    268274{{{
     
    270276}}}
    271277
    272 ===== Part of document from MS Word/Wordpad
     278=== Part of document from MS Word/Wordpad
    273279Object as for D&D, but you can paste html (with formatting attributes, without image) using native C&P.
    274280
    275281Also using native paste, if you select only the image in Word you can also paste it (like for part of image from MS Paint).
    276282
    277 ===== Text from notepad
    278 Data in `text/plain`.
    279 
    280 ===== Text from pdf (Adobe Reader XI)
    281 Data in `text/plain`.
    282 
    283 
    284 = IE - Drag & Drop =
     283=== Text from notepad
     284Data in `text/plain`.
     285
     286=== Text from pdf (Adobe Reader XI)
     287Data in `text/plain`.
     288
     289
     290= 4. Results: IE =
     291
     292== 4.1. Drag & Drop
     293
    285294For IE I tested IE 11 and IE 8.
    286295
     
    289298IE8 does not contains `types` nor `files` arrays in `dataTransfer`, but methods `getData()`, `setData()` and `clearData()` exists so you can get Text data using `getData( 'Text' )` like in IE 11.
    290299
    291 ===== HTML from outside of editable area
     300=== HTML from outside of editable area
    292301You can get text data using `getData("Text")`:
    293302{{{
     
    301310'''IE11''': 1 type in `types`: "Text".
    302311
    303 ===== HTML from inside of editable area
    304 As above.
    305 
    306 ===== Text from textarea
     312=== HTML from inside of editable area
     313As above.
     314
     315=== Text from textarea
    307316Data in 1 type: "Text".
    308317
    309 ===== 2 images from system file browser
     318=== 2 images from system file browser
    310319'''IE11''': Only "Files" data type.
    311320                        2 file in `files` array.
     
    315324'''IE8''': Drop event, but IE8 does not support file upload so `getData("Text")` return null and there are no files array.
    316325
    317 ===== 2 text files from system file browser
    318 As above.
    319 
    320 ===== Part of image from MS Paint
    321 D&D is not possible.
    322 
    323 ===== Part of document from MS Word/Wordpad
     326=== 2 text files from system file browser
     327As above.
     328
     329=== Part of image from MS Paint
     330D&D is not possible.
     331
     332=== Part of document from MS Word/Wordpad
    324333You can get text data using `getData("Text")`:
    325334{{{
     
    333342If I drag single image from Word I get empty DataTransfer object (no types nor files).
    334343
    335 ===== Text from notepad
    336 D&D is not possible.
    337 
    338 ===== Text from pdf (Adobe Reader XI)
    339 D&D is not possible.
    340 
    341 
    342 = IE -  Copy & paste =
     344=== Text from notepad
     345D&D is not possible.
     346
     347=== Text from pdf (Adobe Reader XI)
     348D&D is not possible.
     349
     350
     351== 4.2. Copy & paste
     352
    343353On IE we do not have `evt.clipboardData` nor `evt.dataTransfer` but we can use `window.clipboardData`:
    344354- `evt.dataTransfer` is `null`
     
    351361Also [http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/clipboardDataEX.htm Microsoft Clipboard sample] does not work on IE11 nor on IE8 (it works on IE 10).
    352362
    353 ===== HTML from outside of editable area
     363=== HTML from outside of editable area
    354364You can get plain text data calling `clipboardData.getData("Text")`.
    355365
     
    358368'''IE11''': `types` is `null`.
    359369
    360 ===== HTML from inside of editable area
    361 As above.
    362 
    363 ===== Text from textarea
    364 As above.
    365 
    366 ===== 2 images from system file browser
     370=== HTML from inside of editable area
     371As above.
     372
     373=== Text from textarea
     374As above.
     375
     376=== 2 images from system file browser
    367377No paste event, only `onBeforePaste` with no Text data nor files (on IE 11 files array exists, but contains no element). Also IE show security dialog then I use `onBeforePaste`.
    368378
    369379With native paste event nothing happen.
    370380
    371 ===== 2 text files from system file browser
    372 As above.
    373 
    374 ===== Part of image from MS Paint
     381=== 2 text files from system file browser
     382As above.
     383
     384=== Part of image from MS Paint
    375385'''IE11''': One file in png format (it does not matter what was origin extension).
    376386            Using native paste you can paste image as `data:image/png;base64`.
     
    378388           Nothing happens using native paste.
    379389
    380 ===== Part of document from MS Word/Wordpad
     390=== Part of document from MS Word/Wordpad
    381391'''IE11''': Plain text data (`clipboardData.getData("Text")`) and image file in `files` array.
    382392
     
    385395'''IE8''': Text data using getData("Text"). Plain text with native paste.
    386396
    387 ===== Text from notepad
     397=== Text from notepad
    388398You can get text data calling `clipboardData.getData("Text")`.
    389399
    390400'''IE11''': `types` is `null`.
    391401
    392 ===== Text from pdf (Adobe Reader XI)
     402=== Text from pdf (Adobe Reader XI)
    393403As above.
    394404
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy