Closed
Bug 256079
Opened 21 years ago
Closed 20 years ago
Clicking focused readonly textbox triggers autocomplete
Categories
(Firefox :: Address Bar, defect)
Tracking
()
RESOLVED
FIXED
Firefox1.0
People
(Reporter: jruderman, Assigned: bryner)
References
()
Details
(Keywords: fixed-aviary1.0, regression)
Attachments
(2 files, 3 obsolete files)
1.31 KB,
patch
|
deanis74
:
review+
bryner
:
superreview+
bugs
:
approval-aviary+
|
Details | Diff | Splinter Review |
1.33 KB,
patch
|
Details | Diff | Splinter Review |
1. Load
data:text/html,<form action="http://www.google.com/"><input name="q" readonly>
2. Click the textbox twice.
Result: Autocomplete widget appears.
You can even use autocomplete to put text into the field, which is invisible but
submitted anyway.
Reporter | ||
Updated•21 years ago
|
Flags: blocking-aviary1.0?
My build machine is still in a shambles. What adding this somewhere in
nsFormFillController::MouseClick()? I think it should compile.
if (!mFocusedInput)
return NS_OK;
nsCOMPtr<nsIDOMHTMLInputElement> input = do_QueryInterface(target);
PRBool disabled = PR_FALSE;
input->GetDisabled(&disabled);
if (disabled)
return NS_OK;
Comment 2•21 years ago
|
||
I don't know, but isn't it better to add it in nsFormFillController::Focus?
This seems to work for me. No autocomplete anymore for readonly textboxes.
Comment on attachment 156743 [details] [diff] [review]
patch
>+ if (type.EqualsLiteral("text") && (isReadOnly == PR_FALSE) &&
&& (!isReadOnly)
That looks like the right approach to me. If I had reviewing powers I'd r=me on
this, with the small change I mentioned.
Can someone review and check in?
Updated•21 years ago
|
Attachment #156743 -
Attachment is obsolete: true
Comment on attachment 157009 [details] [diff] [review]
patch2
>+ if (type.EqualsLiteral("text") && (!isReadOnly) &&
I screwed up. You just need !isReadOnly, without the brackets. No need for a
new patch, though, that can be fixed on check-in.
Comment on attachment 157009 [details] [diff] [review]
patch2
Mike, is good to go?
Attachment #157009 -
Flags: review?(mconnor)
Updated•20 years ago
|
Assignee: bugs → bryner
Flags: blocking-aviary1.0? → blocking-aviary1.0+
Comment 8•20 years ago
|
||
Not a "blocker" - if this gets review re-nominate.
Flags: blocking-aviary1.0+ → blocking-aviary1.0-
Comment 9•20 years ago
|
||
Comment on attachment 157009 [details] [diff] [review]
patch2
r=me, without the excess brackets as dean mentioned. And since I'm here, lets
get this on the approval train.
Attachment #157009 -
Flags: review?(mconnor)
Attachment #157009 -
Flags: review+
Attachment #157009 -
Flags: approval-aviary?
Comment 10•20 years ago
|
||
Re-nominating as per comment 8.
Flags: blocking-aviary1.0- → blocking-aviary1.0?
Assignee | ||
Comment 11•20 years ago
|
||
Comment on attachment 157009 [details] [diff] [review]
patch2
>--- nsFormFillController.cpp 20 Aug 2004 20:34:37 -0000 1.34
>+++ nsFormFillController.cpp 25 Aug 2004 23:43:42 -0000
>@@ -507,22 +507,25 @@ nsFormFillController::Focus(nsIDOMEvent*
> {
> nsCOMPtr<nsIDOMEventTarget> target;
> aEvent->GetTarget(getter_AddRefs(target));
>
> nsCOMPtr<nsIDOMHTMLInputElement> input = do_QueryInterface(target);
> if (!input)
> return NS_OK;
>
>+ PRBool isReadOnly = PR_FALSE;
>+ input->HasAttribute(NS_LITERAL_STRING("readonly"), &isReadOnly);
This should be:
input->GetReadOnly(&isReadOnly);
or it won't pay attention to dynamic changes.
Attachment #157009 -
Flags: superreview-
Updated•20 years ago
|
Attachment #157009 -
Flags: approval-aviary?
Comment 12•20 years ago
|
||
I hand-edited Martijn's patch to make the two changes. If it looks good, I'll
make sure it applies properly before checking in.
Attachment #157009 -
Attachment is obsolete: true
Attachment #160678 -
Flags: superreview?(bryner)
Attachment #160678 -
Flags: review?(mconnor)
Comment 13•20 years ago
|
||
Comment on attachment 160678 [details] [diff] [review]
hand-edited patch
I'm going to carry forward Mike's r= on this.
Attachment #160678 -
Flags: review?(mconnor) → review+
Updated•20 years ago
|
Summary: Clicking focused readonly textbox triggers autocompelte → Clicking focused readonly textbox triggers autocomplete
Assignee | ||
Updated•20 years ago
|
Attachment #160678 -
Flags: superreview?(bryner) → superreview+
Comment 14•20 years ago
|
||
looks like patches are coming. we should get this in quick.
Flags: blocking-aviary1.0? → blocking-aviary1.0+
Comment 15•20 years ago
|
||
Attachment #160678 -
Flags: approval-aviary+
Comment 16•20 years ago
|
||
Fixed on trunk and branch.
Comment 17•20 years ago
|
||
My VS.NET 2003 build just crashed and burned with
/cygdrive/x/mozilla/toolkit/components/satchel/src/nsFormFillController.cpp
nsFormFillController.cpp
x:\mozilla\toolkit\components\satchel\src\nsFormFillController.cpp(525)
: error C2039: 'EqualsLiteral' : is not a member of 'nsAutoString'
x:\obj\dist\include\string\nsTString.h(532) : see declaration of
'nsAutoString'
make[6]: *** [nsFormFillController.obj] Error 2
make[6]: Leaving directory `/cygdrive/x/mozilla/obj/toolkit/components/satchel/s
rc'
make[5]: *** [libs] Error 2
Comment 18•20 years ago
|
||
Tinderbox builds have been building fine since this check-in, and this check-in
didn't add any new string comparisons. Based on the line number, you're dying at:
!autocomplete.LowerCaseEqualsLiteral("off"))
but that wasn't changed with this check-in. I think it's something else that's
causing your problem.
Comment 19•20 years ago
|
||
Timo: see my previous comment
Comment 20•20 years ago
|
||
(In reply to comment #17)
> My VS.NET 2003 build just crashed and burned with
>
> /cygdrive/x/mozilla/toolkit/components/satchel/src/nsFormFillController.cpp
> nsFormFillController.cpp
> x:\mozilla\toolkit\components\satchel\src\nsFormFillController.cpp(525)
> : error C2039: 'EqualsLiteral' : is not a member of 'nsAutoString'
> x:\obj\dist\include\string\nsTString.h(532) : see declaration of
> 'nsAutoString'
> make[6]: *** [nsFormFillController.obj] Error 2
> make[6]: Leaving directory `/cygdrive/x/mozilla/obj/toolkit/components/satchel/s
> rc'
> make[5]: *** [libs] Error 2
same error here, what can we do?
Comment 21•20 years ago
|
||
Erm, just compare this:
http://lxr.mozilla.org/aviarybranch/search?string=EqualsLiteral
(No matching files)
http://lxr.mozilla.org/seamonkey/search?string=EqualsLiteral
(Too many hits, displaying first 1000)
And no, there was no successful Firefox build since this checkin. Sweetlou and
Imalo are stuck.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•20 years ago
|
Keywords: fixed-aviary1.0
Comment 22•20 years ago
|
||
Backed out on the branch.
You changed type.Equals to type.EqualsLiteral on the branch. But EqualsLiteral
isn't on the branch, see my comment above.
My build completes successfully with this backed out.
Comment 23•20 years ago
|
||
Well, it finally happened. I broke a build. My apologies to everyone for this
oversight.
I'm at work without my build machine. Can someone check in this patch without
changing Equals to EqualsLiteral? If not I'll do it tonight.
Comment 24•20 years ago
|
||
yeesh, I should have caught that, or bryner. EqualsLiteral was introduced in
the 1.8a cycles by biesi. Steffen, if you don't mind relanding this, I need to
get some code reviews done in a limited time window.. :)
Comment 25•20 years ago
|
||
I'll land this as soon as there's at least one green Firefox branch tinderbox.
Comment 26•20 years ago
|
||
(In reply to comment #0)
> 1. Load
> data:text/html,<form action="http://www.google.com/"><input name="q" readonly>
> 2. Click the textbox twice.
>
> Result: Autocomplete widget appears.
>
> You can even use autocomplete to put text into the field, which is invisible but
> submitted anyway.
Just stumbled upon this bug. I thought this was the desired behavior. I like it,
because you can find old search info there. I only wish there was a way to clear
it or "tune" it.
Comment 27•20 years ago
|
||
Comment on attachment 160755 [details] [diff] [review]
aviary patch, without EqualsLiteral
Bah.
Attachment #160755 -
Attachment is obsolete: true
Comment 28•20 years ago
|
||
This one compiles.
Comment 29•20 years ago
|
||
Comment on attachment 160760 [details] [diff] [review]
aviary patch
Based on comment 24, this can be checked in.
Comment 30•20 years ago
|
||
Checked into branch again 2004-10-01 14:43.
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
Target Milestone: --- → Firefox1.0
Comment 31•20 years ago
|
||
Thanks for fixing my screw-up Steffen!
Comment 32•20 years ago
|
||
*** Bug 265079 has been marked as a duplicate of this bug. ***
Comment 33•20 years ago
|
||
*** Bug 265050 has been marked as a duplicate of this bug. ***
Comment 34•20 years ago
|
||
*** Bug 266278 has been marked as a duplicate of this bug. ***
Comment 35•20 years ago
|
||
*** Bug 263331 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•