| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <title>IE BUG</title> |
|---|
| 4 | <script type="text/javascript" src="/FCKeditor/fckeditor.js"></script> |
|---|
| 5 | <script type="text/javascript" language="javascript"> |
|---|
| 6 | |
|---|
| 7 | window.onload = function() |
|---|
| 8 | { |
|---|
| 9 | oElement = document.getElementById('testLink') ; |
|---|
| 10 | oElement.href = 'http://www.fredck.com' ; // Commenting this line and it will work correctly. |
|---|
| 11 | } |
|---|
| 12 | |
|---|
| 13 | /* |
|---|
| 14 | // The workaround is using the FCKeditor_OnComplete function instead of the window.onload. |
|---|
| 15 | function FCKeditor_OnComplete() |
|---|
| 16 | { |
|---|
| 17 | oElement = document.getElementById('testLink') ; |
|---|
| 18 | oElement.href = 'http://www.fredck.com' ; // Commenting this line and it will work correctly. |
|---|
| 19 | } |
|---|
| 20 | */ |
|---|
| 21 | |
|---|
| 22 | </script> |
|---|
| 23 | </head> |
|---|
| 24 | <body> |
|---|
| 25 | <form method="post"> |
|---|
| 26 | The editor will get the startup focus only because the following link is being changed |
|---|
| 27 | in the window.onload event: <a id="testLink" href="http://www.example.com">Link</a> |
|---|
| 28 | <div style="margin-top: 1600px;"> |
|---|
| 29 | <script type="text/javascript"> |
|---|
| 30 | |
|---|
| 31 | var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; |
|---|
| 32 | oFCKeditor.BasePath = '/FCKeditor/' ; |
|---|
| 33 | oFCKeditor.Create() ; |
|---|
| 34 | |
|---|
| 35 | </script> |
|---|
| 36 | </div> |
|---|
| 37 | </form> |
|---|
| 38 | </body> |
|---|
| 39 | </html> |
|---|