Controller for html content stealing command update from window

VERIFIED FIXED in M14

Status

()

defect
P3
normal
VERIFIED FIXED
20 years ago
11 years ago

People

(Reporter: hangas, Assigned: hangas)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [PDT+] 2/11)

The controller attached to globalWindow to handle browser content (any html 
content) is attached to the window rather than the content so it is winning out 
over the default controller attached to the window from JS in the Mail/News 
window.  This globalWindow controller returns true for Copy and Select All so 
these menu items appear enabled for the entire window even though focus may be on 
an item that does not support either function.
Blocks: 25139
Nominate for beta1 because of the pdt+ bug that depends on this bug.
Keywords: beta1
Hangas, this is your bug, not sfraser's.  You should use insertControllerAt 
rather than appendController, and put yourself at position 0.
based on hyatt's comment, assigning to hangas
Assignee: sfraser → hangas
Whiteboard: [PDT+]
Marking completion date of 2/11.
Status: NEW → ASSIGNED
Whiteboard: [PDT+] → [PDT+] 2/11
Target Milestone: M14
I tried:
top.controllers.insertControllerAt(0, DefaultController);
but that did not help.  globalWindow controller still keeping Copy and Select All 
enabled when thread pane has focus.  Sending to Hyatt for further suggestions.
Assignee: hangas → hyatt
Status: ASSIGNED → NEW
Whiteboard: [PDT+] 2/11 → [PDT+]
Fix your JS.

A glance at widgetGlue shows you always returning true for your selectAll in 
isCommandEnabled of the default controller.

You're also not claiming that you support the copy command on the default 
controller, which will cause us to defer to the next controller in the chain.  
This is the correct behavior.  You need to say that you support copy and wish
to keep it disabled.

Yet another option, if you don't think you want or like the default command 
controller we put in all DOM windows, is to just remove it all together.  You 
can call removeControllerAt(0) to remove the controller from the array.
reassigning.
Assignee: hyatt → hangas
Cool.  This is almost as good as documentation :-).
Status: NEW → ASSIGNED
Whiteboard: [PDT+] → [PDT+] 2/11
Fix checked in.  This can be tested by setting focus on the thread pane and 
choosing Select All.  If the messages are all selected then it is working, if 
nothing happens then it is broken again.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
qa -> lchiang to verify in mail
QA Contact: paulmac → lchiang
QA Contact: lchiang → laurel
OK using:
2000-02-15-09m14 commercial build NT 4.0
2000-02-15-09m14 commercial build Mac OS 9.0
2000-02-15-09m14 mozilla build linux rh6.0
Status: RESOLVED → VERIFIED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: laurel → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.