"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
- 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.
- 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).
setting to m19
moving to future per review with bij and beppe
removing myself from the cc list
Created attachment 93039 [details] [diff] [review]
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
Probably should be filed as another bug.
Over to Joe.
Comment on attachment 93039 [details] [diff] [review]
+ *outCmdEnabled = !(*outCmdEnabled);
That's a bit yucky. How about:
nsresult res = aEditor->GetDocumentIsEmpty(&docIsEmpty);
*outCmdEnabled = !docIsEmpty;
differentiating bug severity of my most critical bugs vai abuse of milestone field
M1: very severe and/or fix in hand
*** Bug 393799 has been marked as a duplicate of this bug. ***
> 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.
Created attachment 554532 [details] [diff] [review]
Updated patch, with test
Comment on attachment 554532 [details] [diff] [review]
Updated patch, with test
Have you also run this through the try server?
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...
Created attachment 560253 [details] [diff] [review]
Update to test_contextmenu.html
We'll need to land this as well when bug 682618 is fixed.