"Select All" is enabled even when text field is empty

RESOLVED FIXED in mozilla9

Status

()

defect
P3
normal
RESOLVED FIXED
19 years ago
8 years ago

People

(Reporter: elig, Assigned: graememcc)

Tracking

({polish})

Trunk
mozilla9
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

Reporter

Description

19 years ago
* TITLE/SUMMARY
"Select All" is enabled even when text field is empty

* STEPS TO REPRODUCE
0) Launch Seamonkey
1) Clear the content of the URL bar
2) Open the "Edit" menu

* RESULT
 - What happened

"Select All" is enabled.

 - What was expected 

"Select All" should be disabled unless the URL bar contains content. (Unable to 
check via context menus)

Note that this also occurs in form text fields, both using the main application 
menu and using context menus.

* REGRESSION

 - Occurs On
        Mac OS/Win32/Linux Seamonkey (200072608 optimized build)		

 - Doesn't Occur On
        Communicator 4.7.4 RTM (Mac OS)




* CONFIGURATIONS TESTED

- [Mac] Power Mac G4 (450 Mhz), 256 MB RAM (VM off), 1024x768 (Thousands of 
Colors), Mac OS 9.0

- [Win32] Vectra VL (266 MHz P2), 96 MB RAM, 800x600 (True Color), NT 4.0 SP5.

- [Linux] Vectra VL (266 MHz P2), 96 MB RAM. Red Hat Linux 6.0 (GNOME).

Comment 1

19 years ago
setting to m19
Keywords: polish
Target Milestone: --- → M19

Comment 2

19 years ago
moving to future per review with bij and beppe
Keywords: helpwanted
Target Milestone: M19 → Future

Updated

19 years ago
Keywords: mozilla0.9

Comment 3

18 years ago
removing myself from the cc list

Comment 4

17 years ago
This patch fixes the problem.
It exposes an editor buglet, though:
In an HTML textarea (and only in there, not in edits) when I type a letter into
an empty textarea, then delete it (Backspace key), I can still Select all.
If I type a letter, do Select All, then delete it (Del key), the command is
correctly disabled.
Probably should be filed as another bug.
Over to Joe.
Assignee: sfraser → jfrancis

Comment 6

17 years ago
Comment on attachment 93039 [details] [diff] [review]
Proposed patch

r=jfrancis
Attachment #93039 - Flags: review+

Comment 7

17 years ago
simon, sr?
Status: NEW → ASSIGNED
Target Milestone: Future → M1
+      *outCmdEnabled = !(*outCmdEnabled);

That's a bit yucky. How about:

PRBool docIsEmpty;
nsresult res = aEditor->GetDocumentIsEmpty(&docIsEmpty);
...
*outCmdEnabled = !docIsEmpty;

Comment 9

17 years ago
differentiating bug severity of my most critical bugs vai abuse of milestone field
M2: severe
M1: very severe and/or fix in hand
Target Milestone: M1 → M2
QA Contact: sujay → editor
Assignee: mozeditor → nobody
Status: ASSIGNED → NEW
Duplicate of this bug: 393799
Assignee

Updated

10 years ago
Depends on: 483651
Assignee

Comment 11

10 years ago
> It exposes an editor buglet, though:
> In an HTML textarea (and only in there, not in edits) when I type a letter into
> an empty textarea, then delete it (Backspace key), I can still Select all.
> If I type a letter, do Select All, then delete it (Del key), the command is
> correctly disabled.
> Probably should be filed as another bug.

Bug 483651
Attachment #554532 - Flags: review?(ehsan)

Comment 13

8 years ago
Comment on attachment 554532 [details] [diff] [review]
Updated patch, with test

Looks good!

Have you also run this through the try server?
Attachment #554532 - Flags: review?(ehsan) → review+
Hm, this isn't ready to be landed yet.

On try, browser/base/content/tests/test_contextmenu.html failed, due to it testing for select all being enabled for an empty text input. Changing the test to reflect that it will be disabled, and the same check fails on Mac. Fun times.

Looking into this...
Assignee

Updated

8 years ago
Depends on: 682338
Assignee

Updated

8 years ago
Depends on: 682618
Assignee

Updated

8 years ago
No longer depends on: 682338
We'll need to land this as well when bug 682618 is fixed.
Attachment #560253 - Flags: review?(gavin.sharp)
Attachment #560253 - Flags: review?(gavin.sharp) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/4297a90d3bea
Assignee: nobody → graememcc_firefox
Status: NEW → ASSIGNED
Flags: in-testsuite+
Keywords: helpwanted
Target Milestone: M2 → mozilla9
https://hg.mozilla.org/mozilla-central/rev/4297a90d3bea
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.