Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#15032 closed defect (fixed)

Dijit/Editor image problem with IE9

Reported by: Jovanovic Owned by: bill
Priority: undecided Milestone: 1.6.2
Component: Editor Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:


Only with Internet Explorer 9, images doesn't render in dijit/Editor widget when they are width and height attribute.

And other problem (i don't know if it's linked with thirst problem), always only with IE9, when i use ViewSource? plugin and i see code source of the editor content, tags width and height attributes of the image take alt value.

Simple example :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">


<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

    dojoConfig= {
        has: {
            "dojo-firebug": true
        parseOnLoad: true,
		isDebug: true,
<script src="" type="text/javascript"></script>

<style type='text/css'>
@import '';

<body class="claro">
<b>Toggle the View Source button to see the contents in source mode.</b>
<div data-dojo-type="dijit.Editor" id="editor" extraplugins="['viewsource']">
Simple image test :
<img alt="test"  width="150" height="88" id="bibli_WR4479" src="" title="test" />


Attachments (1)

test2.html (1.1 KB) - added by Jovanovic 10 years ago.

Download all attachments as: .zip

Change History (12)

Changed 10 years ago by Jovanovic

Attachment: test2.html added

comment:1 Changed 10 years ago by bill

Component: DijitEditor
Milestone: tbd1.8
Owner: set to bill
Status: newassigned

I do reproduce it, due to this line:

html = htmlapi.getChildrenHtml(dn);

returning corrupted HTML (this is from reading the initial editor value as specified in markup). dn.innerHTML is the right value.

comment:2 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

In [28189]:

Fix dijit/_editor/html on IE9 to use W3C code path to get node attribute .
Had to move some has() tests from parser.js to has.js, so they could be shared by this module.

Also making IE8 (in standards mode) follow W3C code path as much as possible, to be able to remove IE6-7 code branch for 2.0.

Fixes image tag width/height corruption on IE9.

Fixes #15032 !strict.

comment:3 Changed 10 years ago by bill

In [28196]:

Workaround IE8 bug where completed="completed" gets printed twice for <img> nodes in LinkDialog test, due to (somehow) "completed" appearing twice in node.attributes[]. I'm not even sure how it gets there at all. Refs #15032 !strict.

comment:4 Changed 10 years ago by bill

#15223 is a duplicate of this ticket.

comment:5 Changed 10 years ago by DJ Mountney

Concerning the latest changes for this bug, on, line 63 : has("dom-attributes-specified-flag") is always going to return true, this is because in addition to being true for IE8, has("dom-attributes-specified-flag") will always be true for browsers with has("dom-attributes-explicit") because of the way they are determined.

comment:6 Changed 10 years ago by bill

Ah, you are right, I'll revise that expression.

comment:7 Changed 10 years ago by bill

In [28510]:

Make dom-attributes-specified-flag test more robust, so it only is true for IE. Note that the flag means "you need to check if attr.specified is true", not that "attr has a specified flag but it's always set to true".

Refs #14672, #15032 !strict.

comment:5 Changed 9 years ago by bill

In [30262]:

Backport [28189], [28196], and [28510] to the 1.7 branch, to use feature testing rather than browser sniffing for dijit/_editor/html module. Fixes #15032 on 1.7 branch !strict.

comment:6 Changed 9 years ago by bill


comment:7 Changed 9 years ago by Ed Chatelain

In [30498]:

Backport minimal changes from [30262] to the 1.6 branch, change IE test to isIE < 9 to fix problem with losing image width and height on IE9 and 10 in dijit/_editor/html module. Fixes #15032 on 1.6 branch !strict.

comment:8 Changed 9 years ago by Ed Chatelain

Note: See TracTickets for help on using tickets.