Opened 13 years ago

Closed 13 years ago

#7514 closed Bug (invalid)

IE7 - Loss of focus for the second time to edit a link, image, smiley,....

Reported by: Alejandro Owned by:
Priority: Normal Milestone:
Component: UI : Dialogs Version: 3.5.4
Keywords: IE7 Cc:

Description

It's a case that only happens to me with IE7 (with Firefox, IE8 and Chrome works well). I use Ckeditor 3.5.2.

If I edit a link for the second time, I get a javascript error referencing a loss of focus. Same happens if I edit an image a second time. The javascript error is the same, but on another line. Mistakes are the file "_source / plugins / dialogui / plugin.js", lines 1039 and 1021:

Line 1039

// GECKO BUG: setTimeout() is needed to workaround invisible selections.
setTimeout( function()
{
     var e = me.getInputElement();
          if ( e )
	  {
	       e.$.focus(); //************* ERROR ****************//
	       e.$.select();
	  }
}, 0 );

Line 1021

// GECKO BUG: setTimeout() is needed to workaround invisible selections.
setTimeout( function()
{
     var element = me.getInputElement();
     element && element.$.focus(); //************* ERROR ****************//
}, 0 );

This error is not limited only to enter a second time in the editing of an image or link, but also occurs on any button on the display an editing window. If this is the second time the page stop working in the background (no javascript error, but inaccessible), see the special characters button or the smiley button for example.

Change History (6)

comment:1 Changed 13 years ago by Alejandro

Component: GeneralUI : Dialogs
Keywords: IE IE7 added
Version: 3.5.2

comment:2 Changed 13 years ago by Jakub Ś

Keywords: IE removed
Status: newpending

I could not reproduce the problem in any of IE browser. Neither could I reproduce it in 3.5.2 nor in nightly version of CKEditor.

Can you still reproduce the issue in latest demo version (maybe it has already been fixed)http://nightly.ckeditor.com/demo and if so could you provide me with detailed scenario. Perhaps I've missed something.

comment:3 Changed 13 years ago by Alejandro

I just put version 3.5.2 CKEditor virgin, even without changing anything. I have the following hierarchical structure:

<domain/localhost>/panel/v3/_include/ckeditor

<domain/localhost>/panel/v3/_include/ckeditor/ckeditor.asp

<domain/localhost>/panel/v3/_include/ckeditor/ckeditor.js

<domain/localhost>/panel/v3/_include/ckeditor/config.js

Step 1: In my page, I write this initial code:

<script type="text/javascript" src="http://websopde/panel/v3/_include/ckeditor/ckeditor.js"></script>
<textarea id="editor1" name="editor1">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>
<script type="text/javascript">
   window.onload = function()
   {
      CKEDITOR.replace( 'editor1' );
   };
</script>

This works fine. If I edit two or more times a link or an image, no javascript error appears

Step 2: Replaced the previous code the following:

<%
set objEditor = new CKEditor
call objEditor.editor("editor1", "<p>Initial value.</p>")
%>

But I must add the next code in "<domain/localhost>/panel/v3/panel/_include/ckeditor/ckeditor.asp"

Private Sub Class_Initialize()
   version = "3.5.2"
   [... more code ...]

   basePath = "/panel/v3/_include/ckeditor/" '***** NEW LINE ***
End Sub
private function ckeditorPath()
   if (basePath <> "") then
      ckeditorPath = basePath
   else
      ' In classic ASP we can't get the location of this included script
      'ckeditorPath = "/ckeditor/"   
      ckeditorPath = "/panel/v3/_include/ckeditor/" '***** NEW LINE ***
   end if

   [... more code ...]
end function

Now I reload my page and it does not work well if I edit two or more times a link or image. I get javascript error on the loss of focus.

comment:4 Changed 13 years ago by Alejandro

Sorry!! I open my page with Firefox in Step 1. Both Step 1 and Step 2 with IE7 fail me :(

comment:5 Changed 13 years ago by Alejandro

Version: 3.5.23.5.4 (SVN - trunk)

After making a deep and thorough analysis of my code with embedded CKEditor, I found that curious decision. It turns out that among the methods I use to create my website, inexplicably gets a FORM for a combo I use, but not in the BODY, but together with the SCRIPT and LINK in the HEAD, causing javascript error collaterally with CKEditor.

I think you can give closed the incidence and not contemplate the existence of a bug :)

comment:6 Changed 13 years ago by Garry Yao

Resolution: invalid
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy