Ticket #8783 (closed bug: duplicate)
1.5.2 getComputedStyle bug
| Reported by: | tasoss@… | Owned by: | rwaldron |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.next |
| Component: | support | Version: | 1.5.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hello.By using 1.5.1 or 1.5.0 i don't get this error.
Particularly i get"
document.defaultView.getComputedStyle(div, null) is null
stack:
"@:1\n((function (selector, context) {return new jQuery.fn.init(selector, context, rootjQuery);}))@ http://deucalion/WebServeCRM/js/jquery/jquery-1.5.2.js:1286\n([object HTMLDocument],[object Array])@ http://deucalion/WebServeCRM/js/jquery/jquery-1.5.2.js:975\n()@http://deucalion/WebServeCRM/js/jquery/jquery-1.5.2.js:414\n([object Event])@ http://deucalion/WebServeCRM/js/jquery/jquery-1.5.2.js:881\n"
"
The div element at this time is <div style="padding-left: 1px; width: 1px; margin-right: 0pt;"></div>
I suppose that the corrections that you made for bug #3333 broke this one in firefox. Using firefox 4.0 Thanks!
Change History
comment:1 Changed 2 years ago by rwaldron
- Owner set to rwaldron
- Priority changed from undecided to blocker
- Status changed from new to assigned
- Component changed from unfiled to css
comment:2 Changed 2 years ago by anonymous
A quick fix, which worked for me:
change line 1283 from
if ( document.defaultView && document.defaultView.getComputedStyle ) {
into
if ( document.defaultView && document.defaultView.getComputedStyle && document.defaultView.getComputedStyle(div, null) ) {
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
