The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla9

Status

()

Core
Editor
P3
normal
RESOLVED FIXED
17 years ago
5 years ago

People

(Reporter: Eli Goldberg, Assigned: graememcc)

Tracking

({polish})

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

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

17 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

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

Comment 2

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

Updated

17 years ago
Keywords: mozilla0.9

Comment 3

15 years ago
removing myself from the cc list

Comment 4

15 years ago
Created attachment 93039 [details] [diff] [review]
Proposed patch

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.

Comment 5

15 years ago
Over to Joe.
Assignee: sfraser → jfrancis

Comment 6

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

r=jfrancis
Attachment #93039 - Flags: review+

Comment 7

15 years ago
simon, sr?
Status: NEW → ASSIGNED
Target Milestone: Future → M1

Comment 8

15 years ago
+      *outCmdEnabled = !(*outCmdEnabled);

That's a bit yucky. How about:

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

Comment 9

15 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

Updated

10 years ago
Duplicate of this bug: 393799
(Assignee)

Updated

8 years ago
Depends on: 483651
(Assignee)

Comment 11

8 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
(Assignee)

Comment 12

6 years ago
Created attachment 554532 [details] [diff] [review]
Updated patch, with test
Attachment #554532 - Flags: review?(ehsan)
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+
(Assignee)

Comment 14

6 years ago
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

6 years ago
Depends on: 682338
(Assignee)

Updated

6 years ago
Depends on: 682618
(Assignee)

Updated

6 years ago
No longer depends on: 682338
(Assignee)

Comment 15

6 years ago
Created attachment 560253 [details] [diff] [review]
Update to test_contextmenu.html

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+
(Assignee)

Comment 16

6 years ago
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: 6 years ago
Resolution: --- → FIXED
Blocks: 712871
You need to log in before you can comment on or make changes to this bug.