Closed Bug 62880 Opened 24 years ago Closed 23 years ago

javascript prompt() does not select default text

Categories

(Core :: XUL, defect, P4)

x86
Windows NT
defect

Tracking

()

RESOLVED DUPLICATE of bug 28583
Future

People

(Reporter: tpowellmoz, Assigned: bzbarsky)

References

()

Details

(Keywords: polish)

Attachments

(1 file)

Using Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001213.

The JavaScript window.prompt() function generates a dialog to get information
from the user. If default text is included in the call, it would be nice for the
text to be automatically selected when the dialog appears so that the user can
immediately type over it. This is very useful in bookmarklets, such as the
bugzilla bookmarklet.

The text is automatically selected in Netscape 4.x and IE 5, so Mozilla feels
less friendly here.
Keywords: 4xp, polish
->danm p4/moz101
Assignee: trudelle → danm
Priority: P3 → P4
Target Milestone: --- → mozilla1.0.1
Can't find a duplicate of this (doesn't mean one doesn't exist).
Marking NEW
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch Proposed patchSplinter Review
Taking bug.

This patch will actually make all sorts of dialogs that only have one textfield
default to selecting that textfield.  ccing mpt for his thoughts, and requesting
review.
Assignee: danm → bzbarsky
Keywords: patch, review
Status: NEW → ASSIGNED
Target Milestone: mozilla1.0.1 → mozilla0.9.3
Keywords: mozilla0.9.3
Seems reasonable to me, but whadda I know. Maybe you should ping alecf, blake
or ben for [s]r.
ccing blake and alec.  What do you think of this change?
It shouldn't apply just to those dialogs which have only one text field.

*** This bug has been marked as a duplicate of 28583 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Er.  Right.  Except we're _not_ tabbing to the dialog; we're focusing it
programmatically.  Under those circumstances, will the fix to bug 28583 apply?

I would say that this one-line fix is worth getting in even if bug 28583 is not
fixed....
mpt, does tabbing into a widget _always_ select its contents?  On all platforms?

The behavior asked for in this bug should be platform-independent, it seems to
me.....
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
pushing out pending response from mpt...
Target Milestone: mozilla0.9.3 → mozilla0.9.4
> Except we're _not_ tabbing to the dialog; we're focusing it programmatically.

See the 2000-12-26 23:40 comment in bug 28583.

> mpt, does tabbing into a widget _always_ select its contents?  On all
> platforms?

See the 2001-04-16 12:11 comment in bug 28583.
> See the 2000-12-26 23:40 comment in bug 28583.

Thank you.

> See the 2001-04-16 12:11 comment in bug 28583.

This implies that the code in bug 28583 will not select the text on Linux... In
my view, the text described in this bug should be selected on all platforms.

If I'm wrong about either of those, please feel free to re-dup the bug.
In fact, default text has a very severe length limit, and will not diplay any 
text with a newline character, except for the last line.
*** Bug 96407 has been marked as a duplicate of this bug. ***
This will also fix bug 49574, marking as blocker
Blocks: 49574
Target Milestone: mozilla0.9.4 → Future
> This implies that the code in bug 28583 will not select the text on Linux...
> In my view, the text described in this bug should be selected on all
> platforms.

Why? Surely that would hork the selection clipboard on X just like any other 
selection would. I still think this is a dup.
Keyboard selections don't hork the clipboard... just mouse ones do.  So there
should be a mechanism for selection without keyboard horkage.

That said, I think I've come to agree that this is a dup (and don't have the
time to deal with pushing this through even if it were not.  :) )

*** This bug has been marked as a duplicate of 28583 ***
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → DUPLICATE
So does this mean the attached patch is just getting thrown away? I'd much
rather have some dialogs automatically do the default text selection than none,
<rant>especially if it means waiting another year until some progress is
made</rant>. Can't this minimal patch be checked in (assuming it still works)
until bug 28583 is fixed? Thanks for the work on this, Boris. I think I know
what you mean about not having the time to push this through.

Should bug 49574 be added to the block list for 28583? Or perhaps treated as a
dup? It seems identical to this bug.
 
No longer blocks: 49574
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: