| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <link href="http://rev.ckeditor.com/ckeditor/trunk/7156/_samples/sample.css" rel="stylesheet" type="text/css" /> |
|---|
| 4 | <script type="text/javascript" src="http://rev.ckeditor.com/ckeditor/trunk/7156/ckeditor.js"></script> |
|---|
| 5 | |
|---|
| 6 | <script> |
|---|
| 7 | var instance; |
|---|
| 8 | var data = "<div><p>Para1</p><p>Para2</p><p>Para3</p></div>"; |
|---|
| 9 | |
|---|
| 10 | var createButton; |
|---|
| 11 | var destroyButton; |
|---|
| 12 | |
|---|
| 13 | function setup() { |
|---|
| 14 | createButton = document.getElementById("createButton"); |
|---|
| 15 | destroyButton = document.getElementById("destroyButton"); |
|---|
| 16 | |
|---|
| 17 | create(); |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | function create() { |
|---|
| 21 | if (!instance) { |
|---|
| 22 | instance = CKEDITOR.appendTo("editor", {}, data); |
|---|
| 23 | |
|---|
| 24 | createButton.disabled=true; |
|---|
| 25 | destroyButton.disabled=false; |
|---|
| 26 | |
|---|
| 27 | destroyButton.focus(); |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | function destroy() { |
|---|
| 33 | if (instance) { |
|---|
| 34 | instance.destroy(); |
|---|
| 35 | instance = null; |
|---|
| 36 | |
|---|
| 37 | createButton.disabled=false |
|---|
| 38 | destroyButton.disabled=true; |
|---|
| 39 | |
|---|
| 40 | createButton.focus(); |
|---|
| 41 | } |
|---|
| 42 | } |
|---|
| 43 | </script> |
|---|
| 44 | </head> |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | <body onLoad="setup()"> |
|---|
| 49 | <h1>IE Selection Test Case for #8222</h1> |
|---|
| 50 | <p><b>Steps to reproduce:</b></p> |
|---|
| 51 | <ol> |
|---|
| 52 | <li>Without clicking inside the editor body, click the Find button - this will result in the first problem, H1 in the elements path and Paragraph Format combo</li> |
|---|
| 53 | <li>Cancel the dialog and Click Destroy</li> |
|---|
| 54 | <li>Click Create and open the Find dialog again as in step 1. - this time you get an error "getParentEditor().getSelection() is null or not an object</li> |
|---|
| 55 | <li>Repeat step 2 & 3.- span keeps getting added under the H1 element (inspect the H1 element to check)</li> |
|---|
| 56 | </ol> |
|---|
| 57 | <p><b>Note:</b>Once the above two issues are fixed, I believe the issue of the disappearing HEAD element will also get fixed</p> |
|---|
| 58 | |
|---|
| 59 | <input id="destroyButton" type="button" value="Destroy" onclick="destroy()"></input> |
|---|
| 60 | <input id="createButton" type="button" value="Create" onclick="create()"></input> |
|---|
| 61 | |
|---|
| 62 | <div id="editor"></div> |
|---|
| 63 | </body> |
|---|
| 64 | </html> |
|---|