logo       

[HtmlUnit] [ htmlunit-Patches-1436102 ] Added support for manually firing o: msg#00000

java.htmlunit.devel

Subject: [HtmlUnit] [ htmlunit-Patches-1436102 ] Added support for manually firing onkeydown events

Patches item #1436102, was opened at 2006-02-21 19:48
Message generated for change (Settings changed) made by mguillem
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448268&aid=1436102&group_id=47038

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Bradley Murray (specialbrad)
>Assigned to: Marc Guillemot (mguillem)
Summary: Added support for manually firing onkeydown events

Initial Comment:
added HtmlElement.keyDown (int) which fires the
onkeydown event associated with the current html
element. The parameter is the keycode that you wish to
fire. Also had to add support to the Event object to
allow for events with keycodes associated with them.

----------------------------------------------------------------------

>Comment By: Marc Guillemot (mguillem)
Date: 2006-02-28 21:40

Message:
Logged In: YES
user_id=402164

Patch applied, thanks.

Notes for your next patch:
- the patch was not in the right format and could not be
directly applied
- maven htmlunit:test didn't run because the charCode
property wasn't declared. I've removed it because you
haven't provided any unit test for it and my quick test with
Firefox has showed that it wasn't the same that keyCode

See:
http://htmlunit.sourceforge.net/submittingPatches.html
http://htmlunit.sourceforge.net/buildingFromCvs.html

----------------------------------------------------------------------

Comment By: Bradley Murray (specialbrad)
Date: 2006-02-23 23:11

Message:
Logged In: YES
user_id=1269316

Round 2, made changes and expanded test case to test for
undefined. Thanks for the help.

----------------------------------------------------------------------

Comment By: Marc Guillemot (mguillem)
Date: 2006-02-23 19:46

Message:
Logged In: YES
user_id=402164

not a string: just try "typeof event.keyCode" and you will
get "number". Furthermore "undefined" is not a string
either: it is the undefined value.
keyCode has to return an object: a Number when there is a
key code and NOT_FOUND (or Context.getUndefinedValue()) when
the property is not defined.

----------------------------------------------------------------------

Comment By: Bradley Murray (specialbrad)
Date: 2006-02-22 22:55

Message:
Logged In: YES
user_id=1269316

wasn't to sure how to handle this case, should keyCode be a
string then and be able to return "undefined" in the case
where it isn't defined?

Thanks

----------------------------------------------------------------------

Comment By: Marc Guillemot (mguillem)
Date: 2006-02-22 22:17

Message:
Logged In: YES
user_id=402164

how do you come to -1 as default keyCode value? Trying on a
mouseEvent with Firefox, I get undefined for the event's
keyCode property.

----------------------------------------------------------------------

Comment By: Bradley Murray (specialbrad)
Date: 2006-02-22 21:34

Message:
Logged In: YES
user_id=1269316

ty ><

----------------------------------------------------------------------

Comment By: Marc Guillemot (mguillem)
Date: 2006-02-22 18:40

Message:
Logged In: YES
user_id=402164

May you have forgotten to check this small stupid checkbox
to attach uploaded file? I can't see any attachment.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448268&aid=1436102&group_id=47038


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise