Closed Bug 13652 Opened 25 years ago Closed 24 years ago

Text select and button blur methods don't work

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: pollmann, Assigned: pollmann)

References

()

Details

(Keywords: testcase, Whiteboard: [nsbeta2-][nsbeta3+] fix in hand)

Attachments

(1 file)

See the Matrix referred to in the above URL.  More extensive explanation of what
exactly isn't working about them would be helpful!
Status: NEW → ASSIGNED
QA Contact: desale → gerardok
Target Milestone: M11
Here is one test case I'm providing to prove how these methods don't work
through javascript.

STEPS TO REPRODUCE:
1] Please copy code I'm providing. Save it as HTML file.
2] Open this HTML file in apprunner.
3] You'll see six test objects and six result text boxes on screen.
4] three test objects are input "text" and other three are "button"s.

EXPECTED RESULTS:
On loading this page, all result text boxes should show that whether method
called on test object is working fine or not. [All methods are called through
javascript]

ACTUAL RESULTS:
Result text boxes do not show anything.

DESCRIPTION:
If we keep on clicking manually on each test object then it shows appropriate
results in results text boxes.
And these methods are already called through javascript, and result text boxes
do not show anything that time. This means methods are not working at all.

This test case covers only text and button. We can create same for other objects
also. Matrix provided in link shows that for which object which method is not
working.

CODE:

<HTML>
<HEAD>
<TITLE>Method Test</TITLE>
</HEAD>
<SCRIPT>
<!--
function report(tempinput,text){
tempinput.value=text;
}
//-->
</SCRIPT>
<BODY >
<FORM NAME="workform" >
Test Object: [Text focus()]<INPUT TYPE="text" NAME="test1" VALUE=""
onFocus="report(this.form.textres1,'focus() method on text works fine');">
&nbsp; Result<INPUT TYPE="text" NAME="textres1" VALUE="" Size="40">
<br>
Test Object: [Text blur()]<INPUT TYPE="text" NAME="test2" VALUE=""
onBlur="report(this.form.textres2,'blur() method on text works fine');">
&nbsp; Result<INPUT TYPE="text" NAME="textres2" VALUE="" Size="40">
<br>
Test Object: [Text Select()]<INPUT TYPE="text" NAME="test3" VALUE="Select"
onSelect="report(this.form.textres3,'select() method on text works fine');">
&nbsp; Result<INPUT TYPE="text" NAME="textres3" VALUE="" Size="40">
<br>
<script>
<!--
document.workform.test1.focus();
document.workform.test2.focus();
document.workform.test2.blur();
document.workform.test3.select();
//-->
</script>
Test Object: [Button focus()]<INPUT TYPE="button" NAME="but1" VALUE="Focus()"
onFocus="report(this.form.butres1,'focus() method on button works fine');">
&nbsp; Result<INPUT TYPE="text" NAME="butres1" VALUE="" Size="40">
<br>
Test Object: [Button blur()]<INPUT TYPE="button" NAME="but2" VALUE="Blur()"
onBlur="report(this.form.butres2,'blur() method on button works fine');">
&nbsp; Result<INPUT TYPE="text" NAME="butres2" VALUE="" Size="40">
<br>
Test Object: [Button Click()]<INPUT TYPE="button" NAME="but3" VALUE="Click()"
onClick="report(this.form.butres3,'click() method on button works fine');">
&nbsp; Result<INPUT TYPE="text" NAME="butres3" VALUE="" Size="40">
<br>
<script>
<!--
document.workform.but1.focus();
document.workform.but2.focus();
document.workform.but2.blur();
document.workform.but3.click();
//-->
</script>
</FORM>
</BODY>
</HTML>

END OF CODE:
I tested this one again today [Builds: 10-19-09], and found that focus() method
started working fine on input text, and button.
Not on others though.
Moving non-critical bugs out.
After careful consideration, I've decided that I probably won't get this bug in
for M12.  Currently I have nearly 50 bugs scheduled for M13, so there is a
possibility that this bug may need to be moved out farther still.
Whiteboard: [TESTCASE]
Marking [TESTCASE].
Target Milestone: M13 → M14
Triaged to M14
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
*** Bug 7134 has been marked as a duplicate of this bug. ***
Verify testcase on bug 7134 before closing this bug out.
Keywords: beta1
[PDT-] unless there is a top 100 site where this occurs
Whiteboard: [TESTCASE] → [PDT-][TESTCASE]
Moving non PDT+ bugs out.
Target Milestone: M14 → M15
*** Bug 29922 has been marked as a duplicate of this bug. ***
If you check above specified URL, it gives you matrix providing info about which 
methods do not work on which elements.
Moving out to M17.
Target Milestone: M15 → M17
Target Milestone: M17 → M18
Rescheduling
Adding nsbeta2 to keywords.
Keywords: nsbeta2
Whiteboard: [PDT-][TESTCASE] → [TESTCASE]
Putting on [nsbeta2+][6/01] radar.  This work must be done by 06/01 or we may 
pull this for PR2.
Whiteboard: [TESTCASE] → [nsbeta2+][6/01][TESTCASE]
Focus and Blur work for all widgets.

Select works the contents of Text and Passwords.
Select does nothing for Textareas (should select contents)
Select acts like Focus for Checkboxes, Radios, Buttons, Resets, and 
Submits. (should do nothing)

Click works for Checkboxes and Radios.
Click does nothing for Buttons, Resets, Submits. (should act like mouse click)

Full suite of DOM tests available here:
http://blueviper/forms/test.html

Spec is here:
http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-882764350
Summary: DOM focus, blur, click and select methods don't work with GFX → DOM click and select methods don't work
Oh, the select() stuff is after some changes in my tree I had forgotten about.  
I have it working correctly in all cases now too.  Now I just have to nail the 
click() methods.
Summary: DOM click and select methods don't work → DOM select and click methods don't work
Whiteboard: [nsbeta2+][6/01][TESTCASE] → partial fix in hand [nsbeta2+][6/01][TESTCASE]
you'll want to work with Mike to be sure his new Ender Lite work doesn't hose 
anything for text controls or textareas.
Got click working for submit, reset, and button inputs.  I think that wraps this 
bug up - will get review/checkin when the tree opens for such things.
Whiteboard: partial fix in hand [nsbeta2+][6/01][TESTCASE] → fix in hand [nsbeta2+][6/01][TESTCASE]
Fix checked in.

To verify, go to this page:
http://blueviper/forms/test.html

Select the Reset Input in the left pane.
Click the "Click" button near the bottom of the right pane.
The form in the right pane should be reset to all "foo" values in the text 
inputs

Select the Select Input in the left pane.
Click the "Click" button near the bottom of the right pane.
The form in the right pane should be submitted

Select the Radio Input in the left pane.
Click the "Click" button near the bottom of the right pane.
The rightmost radio near the top of the page should be checked.

Select the Checkbox Input in the left pane.
Click the "Click" button near the bottom of the right pane.
The checkbox near the top of the page should be checked.

Select the Text input in the left pane
Click the "select" button near the bottom of the right pane.
The contents of the text input should be selected.

Select the Password input in the left pane
Click the "select" button near the bottom of the right pane.
The contents of the password input should be selected.

Select the Text Area in the left pane
Click the "select" button near the bottom of the right pane.
The contents of the text area should be selected.

Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Working fine. Marking verified.
Status: RESOLVED → VERIFIED
Regression test for this bug
   http://mozilla.org/quality/ngdriver/suites/javascript/but006.html
is failing in the latest M17 build (2000080104) under MacOS 8.6.
I checked M16 (2000061411), M17 (2000080104) and M18 (2000080120) for MacOS
against both the attachment of 09/17/99 15:07 (without clicking) and Test suite 
test but006.html.

- Attachement shows Butten blur() broken in M16 and M17, working in M18.
- Test suite shows it broken in M16, M17, and M18, and refers to this bug.

Reopening.

By the way:
  1. http://www.blueviper.com/forms/test.html ==> 404
  2. Neither the mozilla.org main page nor the comments say anything
     about the M17/M18 branch, and the milestones page is out of date.
     The filenames in the nightly build were my only clue.
  3. Attachment test case shows text select() working in M16, broken in M17.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Whiteboard: fix in hand [nsbeta2+][6/01][TESTCASE] → [nsbeta2+][6/01][TESTCASE] Still fails standard test case
Retesting with todays branch commercial now.
Whiteboard: [nsbeta2+][6/01][TESTCASE] Still fails standard test case → [nsbeta2+][6/01]RETESTING! Still fails standard test case
Removing beta2+, I don't think that this bug would meet the beta2 critereon at
this point.  Nominating for beta3.

There are two bugs demonstrated by the test case:
1) Text input .select does not call OnSelect handler
2) buttton input .blur does not blur the button
Status: REOPENED → ASSIGNED
Keywords: correctness, nsbeta3
Whiteboard: [nsbeta2+][6/01]RETESTING! Still fails standard test case → fails attached test case
Agree with pollmann that failing to intercept text input select events and 
failing to intercept button blur events is not a PR2 stopper at this point. 
Concurring with him and marking [nsbeta2-] and [nsbeta3+]. Changing summary from 
"DOM select and click methods don't work" to "DOM0 text select and button blur 
methods don't work".
Summary: DOM select and click methods don't work → DOM0 text select and button blur methods don't work
Whiteboard: fails attached test case → [nsbeta2-][nsbeta3+] fails attached test case
I agree with Pollman too and do not think fact that button blur, and select 
method not working could be nsbeta2+. nsbeta2-, and nsbeta3+ would be perfect 
for this bug.
As far as pollmans comments about being two different bugs addressed by single 
testcase,
There are two bugs demonstrated by the test case:
1) Text input .select does not call OnSelect handler
2) buttton input .blur does not blur the button.

I think we could spilt up bugs in later date.
At this point I do not think it fits to beta2 criterian.
The properties listed in this bug report are defined by W3C's DOM Level-1 spec. 
This is not DOM level 0, but the overlap between DOM1 and Client-side 
JavaScript. Component changed back to DOM 1.
Component: DOM Level 0 → DOM Level 1
Summary: DOM0 text select and button blur methods don't work → Text select and button blur methods don't work
Whiteboard: [nsbeta2-][nsbeta3+] fails attached test case → [nsbeta2-][nsbeta3+] fix in hand for both bugs
rethinking the fix for the blur method - my fix was to give the parent of 
the content focus, looking at what other blurs do...
Whiteboard: [nsbeta2-][nsbeta3+] fix in hand for both bugs → [nsbeta2-][nsbeta3+] fix in hand for one bug
Setting priority to P3
See also bug 46085.  Heikki is working on wiring up the text control so that
selecting text will fire the select event.  This is the same event, but firing
through UI interaction rather than DOM calls.  Both fixes should go in!  :)
Got blur doing the right thing too.
Whiteboard: [nsbeta2-][nsbeta3+] fix in hand for one bug → [nsbeta2-][nsbeta3+] fix in hand
Fix checked in.  To verify, view the attached test case:
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=1735

When the test case finishes loading/running there should be two differences
between this day's build and yesterday's build.

1) The text select() method now calls the onselect handler so you should see the
text "Select() method on text works fine" in the third text input down in the
right hand column

2) The blur() method on the button should now actually blur the button, so the
second button down should not have a focus ring around it (dotted line around
the text inside the button, shouldn't be there).

Thanks for the text cases.  I've also fixed the select() bug for <textarea>s,
and the blur() bug for <a>nchors, <select>s, <button>s, and <textarea>s.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Mass update of qa contact
QA Contact: gerardok → janc
Verified:
2000-09-28-09-MN6 : Windows
2000-09-26-04-M18 : Mac
2000-09-28-10-MN6 : Linux
 
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: