Opened 12 years ago

Last modified 10 years ago

#11614 closed defect, 'display', 'inherit') fails in IE6 and IE7 — at Initial Version

Reported by: jimben Owned by: anonymous
Priority: high Milestone: 2.0
Component: HTML Version: 1.5
Keywords: Cc: Eugene Lazutkin
Blocked By: Blocking:


Behavior is normal in IE8, FF and Chrome.

Clearly the underlying bug is in IE6 and IE7, but handling the error more gracefully would prevent a broken page.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<title>, 'display', 'inherit') fails in IE6 and IE7</title>
<script src="" type="text/javascript"></script>
<script type="text/javascript">
    function callStyleInTryCatch(elementID, styleProp, value) {
        try {
            //this is the line where the reported bug behavior happens:
  , styleProp, value);
            //next two lines are just decoration cleanup:
            dojo.byId('errorReport').innerHTML = "";
            dojo.removeClass(elementID, 'errorBlock');
        } catch (e) {
            //next lines are just decoration to make it easy to see the bug behavior:
            var innerHTML = "<div><code>'" + elementID + "', '" + styleProp + "', '" + value + "')</code></div>"  +
                "<div>error description = <span>" +e.description + "</span></div>";
            var errNode = dojo.byId('errorReport');
            errNode.innerHTML = innerHTML;
            dojo.addClass(elementID, 'errorBlock');
<style type="text/css">
    height: 100px;
    width: 100px;
    background-color: blue;
    background-color: red;
    color: Red;
    <h2>, 'display', 'inherit') fails in IE6 and IE7</code></h2>
    <button onclick="callStyleInTryCatch('displayTest','display','none')">display: none</button>
    <button onclick="callStyleInTryCatch('displayTest','display','')">display: ""</button>
    <button onclick="callStyleInTryCatch('displayTest','display','block')">display: block</button>
    <button onclick="callStyleInTryCatch('displayTest','display','inline')">display: inline</button>
    <button style="border: thin solid red" onclick="callStyleInTryCatch('displayTest','display','inherit')">display: inherit</button>
        <div class="block" id="displayTest">DISPLAY</div>
    <div id="errorReport" />

This problem seems to exist in previous versions of Dojo also.

Change History (0)

Note: See TracTickets for help on using tickets.