Opened 7 years ago

Closed 6 years ago

#5522 closed Bug (fixed)

IE Fails to apply type="text" attribute to Text Fields

Reported by: jmweb Owned by: alfonsoml
Priority: Normal Milestone: CKEditor 3.5.1
Component: UI : Context Menu Version: 3.4.1
Keywords: Cc:

Description

Descriptive summary: When creating a Text Field element of type="text" Internet Explorer does not apply the 'type' attribute to the input tag. Because of this, the Context Menu for the same Text Field element will NOT display if accessed using FireFox.

This bug was realized since our application saves HTML into a database where users can modify the markup using CKEDITOR. Some of our users use Internet Explorer while others use FireFox.

Steps to reproduce: Using Internet Explorer:

  1. Create a sample Text Field element.
  2. Toggle 'Source' mode and copy the HTML which may look like this:
    <p>
    	<input maxlength="5" name="testName" size="5" value="testValue" /></p>
    

Using FireFox:

  1. Toggle 'Source' mode and paste the above HTML.
  2. Toggle off 'Source' mode back to Editor mode.
  3. Right click on the created Text Field and you will notice that the option "Text Field Properties" is not present.

Verified With: CKEDITOR 3.2.1 using IE7 & FF 3.5.9 CKEDITOR 3.2.2 SVN using IE7 & FF 3.5.9

Attachments (2)

plugin.js (7.7 KB) - added by jmweb 6 years ago.
5522.patch (2.4 KB) - added by alfonsoml 6 years ago.
Proposed patch

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by jmweb

comment:1 Changed 6 years ago by jmweb

  • Resolution set to fixed
  • Status changed from new to closed
  • Version changed from 3.2.1 to 3.4.2

This is a patch, not a solution to the problem. The solution would be to ensure that the 'type' attribute gets inserted in IE.

This patch allows the context menu to work properly for input elements missing a 'type' attribute.

First time contributing. I am not sure I followed the correct steps. I basically edited the ckeditor/_soource/plugins/forms/plugin.js file from the nightly build.

comment:2 Changed 6 years ago by alfonsoml

  • Keywords HasPatch added
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 3.4.2 to 3.4.1

If you close a ticket, then no one will look at it. Please, read the Ticket life cycle

Changed 6 years ago by alfonsoml

Proposed patch

comment:3 Changed 6 years ago by alfonsoml

  • Keywords HasPatch removed
  • Owner set to alfonsoml
  • Status changed from reopened to review

The patch fixes the problem, but while testing it be aware of #6646 because the context menu won't work when the content is reloaded.

comment:4 Changed 6 years ago by alfonsoml

Note: IE8 in standards mode works correctly by default, the lack of type="text" is only present in compatibility mode or old versions.

comment:5 Changed 6 years ago by garry.yao

  • Milestone set to CKEditor 3.5.1

Let's have #6646 fixed first.

comment:6 Changed 6 years ago by garry.yao

  • Status changed from review to review_failed

Why we're still keeping the last chunk of the patch (being text type as the default)?

comment:7 Changed 6 years ago by alfonsoml

  • Status changed from review_failed to review

Yes, we cold skip those two lines, but on the other hand it will avoid changes to the source if the content is first created with a compliant browser that generates the type="text" and then edited with IE that will remove it.

comment:8 Changed 6 years ago by garry.yao

  • Status changed from review to review_passed

comment:9 Changed 6 years ago by alfonsoml

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [6296]

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