Opened 6 years ago

Closed 6 years ago

#10600 closed Bug (duplicate)

Disable magicline when element is readOnly

Reported by: dggtydnk Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0 Beta
Keywords: Cc:

Description

When an element is readOnly (contentEditable = false), the magic line plugin should not be active within that element.

Given the following HTML:

<div id="test">
  <ul>
    <li>Do I get a magic line</li>
  </ul>
</div>

And running the following code on the editor demo page to make the div readOnly:

CKEDITOR.instances.editor2.document.$.getElementById("test").contentEditable=false;

At this point, I am unable to edit the contents of the readOnly DIV, but still get the magic line before/after the UL within the readOnly DIV.

Change History (4)

comment:1 Changed 6 years ago by dggtydnk

This seems to work as expected in IE. I am able to reproduce this in Firefox and Chrome. To reproduce in Chrome, I needed to add a <p>&nbsp;</p> before and after the <div id="test">, so the HTML to reproduce in Chrome is:

<p>&nbsp;</p>
<div id="test">
  <ul>
    <li>Do I get a magic line</li>
  </ul>
</div>
<p>&nbsp;</p>

comment:2 Changed 6 years ago by Piotrek Koszuliński

Status: newconfirmed
Version: 4.1.24.0 Beta

I think that this issue will be possible to be fixed after #9764, because blacklisting is going to be proposed. However, I'll keep this ticket opened for now.

comment:3 Changed 6 years ago by Jakub Ś

I was able to reproduce this problem in every browser from CKEditor 4.0 beta.

  1. Insert below code
    <div id="test" contenteditable="false">
      <ul>
        <li>Do I get a magic line</li>
      </ul>
    </div>
    
  2. Hover below list and insert Paragraph when magic line shows up (this one is inserted below div)
  3. Hover again below list and insert Paragraph when magic line shows up (this one is inserted inside div)

We had similar issue with whole editor #9887. Perhaps magic line should check is element has contenteditable attribute set to false?

NOTE: Perhaps readOnly term should be dropped here as it can get mistaken with editor readOnly

Last edited 6 years ago by Jakub Ś (previous) (diff)

comment:4 Changed 6 years ago by Piotrek Koszuliński

Resolution: duplicate
Status: confirmedclosed

Duplicates #10828.

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