Closed
Bug 108547
Opened 24 years ago
Closed 24 years ago
javascript error in attachment.cgi - using bad DOM Style code
Categories
(Bugzilla :: Attachments & Requests, defect, P2)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: timeless, Assigned: caillon)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
1.36 KB,
patch
|
caillon
:
review+
kiko
:
review+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5+) Gecko/20011105
Error: small.style.getProperty is not a function
Source File: http://bugzilla.mozilla.org/attachment.cgi?id=56564&action=edit
Line: 212
this build is generally borked, i'm not sure what caused this. oh wait, sure i
am :-)
feel free to dupe.
Comment 2•24 years ago
|
||
Um. Are new bugs just getting assigned to me by default now or something? :)
First, that attachment doesn't even have JavaScript in it--wrong attachment #?
Second, my patch modified a couple of GetProperty methods in *frames*, but I
didn't touch style in the least. And form control content doesn't have any
getProperty() method to begin with ...
I really have no idea who this goes to though, esp. since I can't see the
testcase :)
Comment 3•24 years ago
|
||
Okeee... the page in question has:
var small = document.getElementById('smallCommentFrame');
if ( small.style.getProperty('display') == 'none' )
Too bad that .style gives you a CSSStyleDeclaration and that has no
getProperty() method, just a getPropertyValue(). Over to bugzilla -- this is a
bug in the bugzilla JS pure and simple.
Assignee: jkeiser → myk
Component: HTML Form Controls → Creating/Changing Bugs
Product: Browser → Bugzilla
QA Contact: madhur → matty
Version: other → 2.10
Comment 4•24 years ago
|
||
CCing the javascript experts on the Bugzilla team.
I do know the page in question has been completely redone in CVS since the last
time bugzilla.mozilla.org updated, but I don't know if that affected the javascript.
Comment 5•24 years ago
|
||
Oh oh oh! Sorry timeless, I didn't realize I was supposed to be looking at the
actual attachment.cgi page, I was looking at the patch :)
Comment 6•24 years ago
|
||
Well, that rewrite may have affected the JS but this error does not occur on
Linux 2001103012 ... so it may be a combo of the two.
Comment 7•24 years ago
|
||
what I meant by the page being redone is that the javascript in question may not
even be there anymore on the current version (bugzilla.mozilla.org is not
running the current version until this coming Wednesday night)
Comment 8•24 years ago
|
||
OK.
STEPS TO REPRODUCE:
1) Load an attachment page
2) Submit the form
The onsubmit() handler should fire and cause those errors. If it does not, it's
a bug. If it did not fire prior to jkeiser's checkin.... well... :)
jkeiser, did you actually submit the form when testing?
| Assignee | ||
Comment 9•24 years ago
|
||
Taking.
Assignee: myk → caillon
Blocks: 98307
OS: Windows 98 → All
Priority: -- → P2
Hardware: PC → All
Summary: javascript error → javascript error in attachment.cgi - using bad DOM Style code
Target Milestone: --- → Bugzilla 2.16
Version: 2.10 → 2.15
| Assignee | ||
Comment 10•24 years ago
|
||
| Assignee | ||
Comment 11•24 years ago
|
||
The attached patch gets rid of the bad style.(get|set)Property(foo) and replaces
it with style.foo code plus a minor cleanup.
| Reporter | ||
Comment 12•24 years ago
|
||
Comment on attachment 56606 [details] [diff] [review]
Patch to fix
> function hideElementById(id)
> {
> var elm = document.getElementById(id);
>- if (!elm) return;
>-
>- elm.style.setProperty('display', 'none', '');
>+ if (elm) {
>+ elm.style.display = 'none';
>+ }
remove this:
>+ return;
> }
> function showElementById(id, val)
> {
> var elm = document.getElementById(id);
>- if (!elm) return;
>-
>- if (!val) val = 'inline';
>- elm.style.setProperty('display', val, '');
>+ if (elm) {
>+ if (!val) val = 'inline';
>+ elm.style.display = val;
>+ }
remove this:
>+ return;
> }
r=timeless w/ those removed
Attachment #56606 -
Flags: review-
| Assignee | ||
Comment 13•24 years ago
|
||
| Assignee | ||
Comment 14•24 years ago
|
||
Comment on attachment 56689 [details] [diff] [review]
Patch v2
This patch removes the two returns and timeless said:
r=timeless w/ those removed
Attachment #56689 -
Flags: review+
| Assignee | ||
Updated•24 years ago
|
Attachment #56606 -
Attachment is obsolete: true
Comment 15•24 years ago
|
||
Comment on attachment 56689 [details] [diff] [review]
Patch v2
r=kiko good work c.
Attachment #56689 -
Flags: review+
Comment 16•24 years ago
|
||
Checking in template/default/attachment/edit.atml;
/cvsroot/mozilla/webtools/bugzilla/template/default/attachment/edit.atml,v <--
edit.atml
new revision: 1.5; previous revision: 1.4
done
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Component: Creating/Changing Bugs → attachment and request management
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•