Opened 10 years ago

Closed 10 years ago

#9110 closed bug (notabug)

Tooltip Widget breaks in IE

Reported by: youngjl1 Owned by: youngjl1
Priority: minor Milestone: none
Component: ui.widget Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:


jQuery Version: 1.9.1

jQuery-UI Version: 1.9.2

Browser: IE8

OS: Windows

Steps to see what I'm talking about:

  1. Go here in chrome:
  2. Pull up Chrome Dev Tools -> Sources -> Open jquery-ui.js
  3. Add a break point on line 842 where it says
    • hasOptions = !$.isEmptyObject( options );
  4. Hover over where it says "Some text"
  5. The code should stop at the break point, check the value of options. It is true.

Now, according to the documention of $.isEmptyObject (

The argument should always be a plain JavaScript Object as other types of object (DOM elements, primitive strings/numbers, host objects) may not give consistent results across browsers.

The boolean value of true is definitely not a plain JS Object and this actually does cause issues in IE. To see:

  1. Go to in Internet Explorer 8
  2. Pull up dev tools
  3. Switch Browser Mode to "IE8 Compat View"
  4. Switch Document Mode to "IE7 Standards"
  5. Switch to Script tab
  6. run the following script: true.toJSON()

running that script returns true because for some unknown reason the boolean value true has a method associated with it. In this weird case calling $.isEmptyObject(true) will actually return false when for any other browser it would return true, and in this case the widget will break.

Sorry I was unable to give straight-forward directions to reproduce this. This is the first time I've logged a jquery bug.

Change History (7)

comment:1 Changed 10 years ago by youngjl1

Basically the widget shouldn't be passing a primitive boolean into $.isEmptyObject. It goes against the documentation of that method and in some cases with IE the widget will break.

comment:2 Changed 10 years ago by Scott González

Owner: set to youngjl1
Status: newpending

I'm not seeing any errors in that jsFiddle example using IE 8. Your description doesn't sound like you're able to reproduce this either. I understand the technical point you're making about $.isEmptyObject(), but I cannot reproduce the bug you're trying to report.

comment:3 Changed 10 years ago by youngjl1

Status: pendingnew

You're able to use jsFiddle with IE 8? I get js errors trying to go to that site.

comment:4 Changed 10 years ago by Scott González

Status: newpending

Use to just load the output.

comment:5 Changed 10 years ago by Scott González

Alternatively, you can use

comment:6 Changed 10 years ago by youngjl1

Status: pendingnew

I've researched this some more and determined that the problem I was experiencing was not with the jQuery UI. Please close this bug.

comment:7 Changed 10 years ago by tj.vantoll

Resolution: notabug
Status: newclosed
Note: See TracTickets for help on using tickets.