https://bugzilla.novell.com/show_bug.cgi?id=697828

https://bugzilla.novell.com/show_bug.cgi?id=697828#c0


           Summary: Control.KeyPress event is triggered BEFORE
                    Control.KeyDown event
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.10.x
          Platform: IA64
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs@lists.ximian.com
        ReportedBy: juanantonio....@gmail.com
         QAContact: mono-bugs@lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=432778)
 --> (http://bugzilla.novell.com/attachment.cgi?id=432778)
Sample file

User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML,
like Gecko) Chrome/12.0.742.68 Safari/534.30

I was handling the KeyDown event on a multiline textbox, and when enter was
pressed the Handled property of the event was set to true so the new line was
not painted on the control.

This works fine on windows under microsoft's .net runtime, but on linux it's
not working as it should.

This link:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keypress.aspx

explains that the order of the events should be KeyDown KeyPress and KeyUp, but
the Mono runtime triggers KeyPress before keyDown, so the newline is painted
before I can do something with it.

Reproducible: Always

Steps to Reproduce:
1.Create a WinForms project
2.Add any control to the form and handle KeyDown and KeyPress event
3.See for your self
Actual Results:  
The KeyPress event is triggered before KeyDown

Expected Results:  
keyDown should be triggered first

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to