Bug Tracker

Opened 11 years ago

Closed 11 years ago

#4460 closed bug (wontfix)

setting some css values generates a error in IE

Reported by: ThomasCr Owned by:
Priority: critical Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

IE 7 generates me a error, when I try to set as example display=table.

The setup should be wrapped around a try statement.

I made a patch gains the current nightly build.

Attachments (3)

jquery-nightly.patch (257 bytes) - added by ThomasCr 11 years ago.
jquery-nightly.2.patch (348 bytes) - added by ThomasCr 11 years ago.
new version with jQuery.log() call
jquery-nightly.3.patch (311 bytes) - added by ThomasCr 11 years ago.
ups.. fixed version.. console.debug() now :)

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by ThomasCr

Attachment: jquery-nightly.patch added

comment:1 Changed 11 years ago by dmethvin

If jQuery traps and ignores the error, how would you diagnose the problem?

comment:2 Changed 11 years ago by ThomasCr

why should i try to do this?

I need to set a value, and when a browser can not understand it, it should not stop the script.. its also possible to make a console log message in the catch block with key and value - when you need to debug it.

But jquery should not break the execution.

In this special case its fact: I want to set this on every browser who understand the css value display=table and when IE cannot handle it - it is ok with the default value for display.

comment:3 Changed 11 years ago by dmethvin

That patch would silently accept any invalid string, number, or object for a css value. Would you really want that?

comment:4 Changed 11 years ago by ThomasCr

yes, shure. I think this patch in combination with a jQuery.log() in the catch block is a very good solution. like this...

try {style[ name ] = value;} catch(e) {jQuery.log('invalid style: ' + name + '=' + value);} }}}

Changed 11 years ago by ThomasCr

Attachment: jquery-nightly.2.patch added

new version with jQuery.log() call

Changed 11 years ago by ThomasCr

Attachment: jquery-nightly.3.patch added

ups.. fixed version.. console.debug() now :)

comment:5 Changed 11 years ago by dmethvin

Resolution: wontfix
Status: newclosed

There aren't any other places in jQuery that use console.debug and this doesn't seem like the right place to start. I'll close this for now. There are other tickets and threads open that suggest a more complete "debugging" version of jQuery and it seems that something like this belongs there.

Note: See TracTickets for help on using tickets.