Closed Bug 260158 Opened 20 years ago Closed 20 years ago

datepicker/timepicker menulist have blinking text cursor while popped up, but can't type

Categories

(Calendar :: Sunbird Only, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gekacheka, Assigned: gekacheka)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: cvs-cal

Bug 259155 modified datepicker and timepicker to use menulist.
When the menupopup is popped up, the text cursor is still visible and blicking,
inviting you to type at it, but typing does nothing.

Reproducible: Always
Steps to Reproduce:
1. In event dialog, click on dropdown menulist button of datepicker or timepicker.

Actual Results:  
While the popup is popped up, the text cursor is still blinking in the text field.
Typing does nothing.

Expected Results:  
Cursor should not be visible and blinking.
One option is to select all the text, as it will all be replaced by clicking on
popup.  This seems to be what happens in the seamonkey and firefox urlbar.
hmm...

In Seamonkey for me, text is not selected, and cursor stays blinking in the
url-bar.  though a text-select may be a decent solution until that text-blinking
bug is fixed.

----
See: Bug 259155 comment #8
----

Though I do agree a work-around is useful/needed for at least us, and select-all
on the text could work.
Add code to select text on popup and when click on date or time in picker.

datepicker.onPopup():  add select text 
datepicker.clickDate():  add select text after it is changed
datepicker.select():  added method, like menulist.select or textbox.select

timepicker.onPopup(): add select text
timepicker.select(): added method

timepickergrids.timeSelected(): add select text after it is changed.
Assignee: mostafah → gekacheka
Status: NEW → ASSIGNED
Comment on attachment 159275 [details] [diff] [review]
datepicker.xbl, timepicker.xbl patch: select text on popup and on click date/time

tested on SB 0.2a, Moz 1.7.3, TB 0.8
Attachment #159275 - Flags: first-review?(mostafah)
Comment on attachment 159275 [details] [diff] [review]
datepicker.xbl, timepicker.xbl patch: select text on popup and on click date/time

In: 
		 this.update(new Date(aMiniMonthGrid.value), true)
+		 // select changed value so no cursor appears (can't type to
it).
+		 this.select();
+

shouldn't the first line end with a semicolon?

It's not related to the patch but still.
Comment on attachment 159275 [details] [diff] [review]
datepicker.xbl, timepicker.xbl patch: select text on popup and on click date/time

Checked in.
Attachment #159275 - Flags: first-review?(mostafah) → first-review+
Fixed in CVS.
I'll add the semicolon once it is confirmed that it should be there.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Yes the semicolon should be there.  JavaScript is lenient about semicolons.
The bugspam monkeys have been set free and are feeding on Calendar :: Sunbird Only. Be afraid for your sanity!
QA Contact: gurganbl → sunbird
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: