Closed Bug 592309 Opened 14 years ago Closed 13 years ago

Web Console should use <description> elements instead of <label> elements for its output

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: pcwalton, Assigned: pcwalton)

References

Details

(Whiteboard: [kd4b6])

Currently, the Web Console puts text inside of XUL <label> elements. This is an abuse of XUL. They should be <description>s instead.

This may or may not fix these selection-related oddities:
(a) It's easy to have text selected in both the input and the output, which is unexpected.
(b) Selecting output nodes programmatically via window.getSelection() works, but it doesn't enable the Copy command. This makes unit testing difficult.
Whiteboard: [kd4b6]
(In reply to comment #0)
> Currently, the Web Console puts text inside of XUL <label> elements. This is an
> abuse of XUL. They should be <description>s instead.
> 
> This may or may not fix these selection-related oddities:

Changing to use <description> won't affect how the selection behaves. It just prevents checking for access keys on it, as labels label another control and descriptions are just text.


> (a) It's easy to have text selected in both the input and the output, which is
> unexpected.

That would imply that one or the other elements isn't focusable.


> (b) Selecting output nodes programmatically via window.getSelection() works,
> but it doesn't enable the Copy command. This makes unit testing difficult.

That should work. How are you checking for the copy command being enabled? Fixing (a) may be the issue though.
(In reply to comment #1)
> That should work. How are you checking for the copy command being enabled?

var controller = top.document.commandDispatcher.getControllerForCommand("cmd_copy");
dump("" + controller.isCommandEnabled("cmd_copy"))
Severity: normal → blocker
Reprioritizing bugs. You can filter the mail on the word TEABAGS.
Severity: blocker → normal
This is fixed in my patch queue for bug 605621.
Assignee: nobody → pwalton
Status: NEW → ASSIGNED
To be clear, it looks like the reason we're keeping this bug open is to verify that the selection/copy behavior above is correct.
Depends on: 605621
Which we won't be able to do meaningfully until bug 605621 lands, so I'm listing it as a dependency.
mass change: filter on PRIORITYSETTING
Blocks: devtools4
Priority: -- → P2
selection works fine. Not sure this is worth doing.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.