Search and Top Navigation
#9110 closed bug (notabug)
Opened February 22, 2013 03:28AM UTC
Closed February 24, 2013 02:00AM UTC
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: |
Description
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: http://jsfiddle.net/EP5Jx/#run
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 (http://api.jquery.com/jQuery.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 msn.com 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.
Attachments (0)
Change History (7)
Changed February 22, 2013 03:31AM UTC by comment:1
Changed February 22, 2013 07:28PM UTC by comment:2
owner: | → youngjl1 |
---|---|
status: | new → pending |
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.
Changed February 22, 2013 08:14PM UTC by comment:3
status: | pending → new |
---|
You're able to use jsFiddle with IE 8? I get js errors trying to go to that site.
Changed February 22, 2013 08:23PM UTC by comment:4
status: | new → pending |
---|
Use http://jsfiddle.net/EP5Jx/show to just load the output.
Changed February 22, 2013 08:23PM UTC by comment:5
Alternatively, you can use http://jsbin.com
Changed February 24, 2013 01:23AM UTC by comment:6
status: | pending → new |
---|
I've researched this some more and determined that the problem I was experiencing was not with the jQuery UI. Please close this bug.
Changed February 24, 2013 02:00AM UTC by comment:7
resolution: | → notabug |
---|---|
status: | new → closed |
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.