Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#5562 closed Bug (fixed)

[IE] Unable to have 'contentEditable=false" in effect

Reported by: Garry Yao Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.3
Component: General Version: SVN (CKEditor) - OLD
Keywords: Confirmed IE Review+ Cc:

Description

Environment

IE8

Reproducing Procedures

  1. Open any of the sample page;
  2. Load the following content in editor;
    <p>
    	This is some <strong contentEditable="false">sample text</strong>.</p>
    
  3. Click inside 'sample text';
    • Actual Result: It's still able to have cursor blinking inside the words and start typing.
    • Expected Result: The strong element should be displayed as control type and should be unable to edit it.

Attachments (3)

5562.patch (938 bytes) - added by Garry Yao 10 years ago.
5622_2.patch (982 bytes) - added by Garry Yao 10 years ago.
5562_3.patch (968 bytes) - added by Garry Yao 10 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 10 years ago by Garry Yao

Note that it's working only when using no docType on editing document (config.docType="").

Changed 10 years ago by Garry Yao

Attachment: 5562.patch added

comment:2 Changed 10 years ago by Garry Yao

Keywords: Review? added
Milestone: CKEditor 3.4CKEditor 3.3
Owner: set to Garry Yao
Status: newassigned
Version: SVN (CKEditor)

Taking it into this release so users start to receive the real benefits of #3593.

comment:3 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review- added; Review? removed

I like the approach, but that's not enough: If the user does an undo the runtime style is lost, if some content is inserted (paste, insertHtml, ...) it won't get the patch applied, if a node is marked as contentEditable=true also it won't get this applied...

As this problem has always existed in IE8, I don't think that we need to rush with it. Most of the people won't try to use this until we port the "Placeholder" sample plugin, which by the way can be useful to test that this is working as expected in more situations.

Changed 10 years ago by Garry Yao

Attachment: 5622_2.patch added

comment:4 Changed 10 years ago by Garry Yao

Keywords: Review? added; Review- removed

I don't think that we need to rush with it.

I believe that "Placeholder" and likes are the real reason for us to have #3593 and I would try my best to pave the roads making this happen in IE8, otherwise we'll need long time to wait IE9 and probably a wont-fix.

comment:5 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review- added; Review? removed

I tried to said that until we provide a sample plugin like "Placeholder" most of the people won't try and of those who try very few will make it work a plugin that handles contentEditable=false. Besides that, having that plugin ready will simplify the task to find any other issues.

I thought that coding the workaround for all the cases would be too complex, but I forgot that it's possible to use nice CSS with IE8. The main issue that I see now is that the "CKEDITOR.env.ie8Compat" check is based on the hosting page, so if it's in quirks mode, but they don't change the default Standards mode for the editor they will have the problem. A simple solution could be to use just "CKEDITOR.env.ie8" as the css selector won't be understood when the iframe is in quirks mode.

Also, using it on tables doesn't work. If it's applied to <p> or <ul> it makes them "float" due to the change in display.

Fixing all these issues would be perfect, but unless someone else has objections I will give R+ just by fixing the first problem and filing follow up bugs for the rest.

Changed 10 years ago by Garry Yao

Attachment: 5562_3.patch added

comment:6 in reply to:  5 Changed 10 years ago by Garry Yao

Keywords: Review? added; Review- removed

Replying to alfonsoml:

I tried to said that until we provide a sample plugin like "Placeholder" most of the people won't try and of those who try very few will make it work a plugin that handles contentEditable=false. Besides that, having that plugin ready will simplify the task to find any other issues.

I'm sure "Placeholder" and like will the best validation of the fix here.

The main issue that I see now is that the "CKEDITOR.env.ie8Compat" check is based on the hosting page, so if it's in quirks mode, but they don't change the default Standards mode for the editor they will have the problem. A simple solution could be to use just "CKEDITOR.env.ie8" as the css selector won't be understood when the iframe is in quirks mode.

Nice idea.

Also, using it on tables doesn't work.

Not my fault really, contentEditable is not working on table at all.

If it's applied to <p> or <ul> it makes them "float" due to the change in display.

This's important, the new patch has switched to another safer trigger for gaining layout.

comment:7 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review+ added; Review? removed

Remember to file a ticket about the problem with tables so we can track (or close) it as a separate item. I can't find also a ticket to track the Placeholder plugin.

comment:8 Changed 10 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

#5655 and #5654 are filed.
Fixed with [5447] in 3.3.x branch.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy