Closed
Bug 141716
Opened 23 years ago
Closed 23 years ago
Mozilla context menu broken on query.cgi
Categories
(Bugzilla :: Query/Bug List, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: caillon, Assigned: caillon)
References
()
Details
Attachments
(1 file, 1 obsolete file)
1.70 KB,
patch
|
bbaetz
:
review+
bbaetz
:
review+
|
Details | Diff | Splinter Review |
Using a nightly build, and probably on nightlies for a while back, there is no
context menu on the query page.
This is because query.cgi defines a getSelection() JS method. However,
getSelection() is a method of the DOM0 window object (global scope). Defining
this function over-writes the native method and uses the bugzilla method
instead. Because context menu relies on window.getSelection() for its Search
engine context menu, the context menu breaks.
The bug is two-fold. Bugzilla should not use getSelection or any other names
such as this, and Mozilla should either prevent getSelection from being modified
by code like this, or not break when this happens. This bug covers renaming the
getSelection() method in Bugzilla. I will file a separate bug for the Mozilla
issue.
![]() |
Assignee | |
Comment 1•23 years ago
|
||
Bug 141717 on fixing Mozilla.
![]() |
Assignee | |
Comment 2•23 years ago
|
||
use bzFoo() instead of foo() for function names.
![]() |
Assignee | |
Updated•23 years ago
|
Comment 3•23 years ago
|
||
Comment on attachment 82008 [details] [diff] [review]
Proposed fix v1.0
I'd like to see a senior member of the team OK these changes, as I personally
hate name prefixing.
I understand it's a band-aid that will fix things for our main user base which
I'm okay with, though.
Attachment #82008 -
Flags: review+
Comment 4•23 years ago
|
||
I recommend changing getSelection to get_selection for 2.16 and deal with the
naming issue in the 2.18 timeframe. That way only the simplest, least-risky fix
goes into the 2.16 release, and there's more time to talk about naming conventions.
![]() |
||
Comment 5•23 years ago
|
||
Comment on attachment 82008 [details] [diff] [review]
Proposed fix v1.0
What myk said. I don't suppose JS has namespaces? Thats how C++ gets out of
this mess...
Attachment #82008 -
Flags: review-
![]() |
Assignee | |
Comment 6•23 years ago
|
||
> I don't suppose JS has namespaces?
Not in JS 1.x. IIRC it is in the JS 2.0/ECMA 262 4th Edition proposal...
Attachment #82008 -
Attachment is obsolete: true
![]() |
||
Comment 7•23 years ago
|
||
Comment on attachment 82366 [details] [diff] [review]
v1.1: s/getSelection/get_selection/
I still say this is a moz bug, but it fixes it for me, so r=bbaetz x2
Attachment #82366 -
Flags: review+
![]() |
Assignee | |
Comment 8•23 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•13 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
•