Ticket #7514 (closed Bug: invalid)

Opened 4 years ago

Last modified 3 years ago

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

Reported by: andynedine 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

comment:1 Changed 4 years ago by andynedine

  • Keywords IE, IE7 added
  • Version set to 3.5.2
  • Component changed from General to UI : Dialogs

comment:2 Changed 4 years ago by j.swiderski

  • Keywords IE, removed
  • Status changed from new to pending

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 4 years ago by andynedine

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 4 years ago by andynedine

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

comment:5 Changed 4 years ago by andynedine

  • Version changed from 3.5.2 to 3.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 3 years ago by garry.yao

  • Status changed from pending to closed
  • Resolution set to invalid
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy