Empty TextBox and END key pressed
Last post 03-31-2008 9:11 PM by mchlSync. 8 replies.
Sort Posts:
03-31-2008 3:44 AM
Empty TextBox and END key pressed

Hi,

I found a problem in TextBox control. If there is no text in TextBox and you type END (key) then your TextChanged event handler become inactive and you can't bring it to life again! And after you had lost your TextChanged handler every char you type apears in textbox with time delay (near a second).

Can anyone explane me this, or it's a bug?

pavelsua

Loading...
Joined on 03-19-2008
Posts 9
03-31-2008 4:59 AM
Re: Empty TextBox and END key pressed

Hi, I just checked. it works in my machine. What version of SL, browers are you using? Can you give us the steps to reproduce this issue?

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlSync

Loading...
Joined on 09-16-2005
Singapore
Posts 2,295
03-31-2008 5:11 AM
Re: Re: Empty TextBox and END key pressed

I using Windows 2003 server, IE 7 (build 5730) with SL 2.0 beta.

To reproduce this bug I wrote simple xaml with one textbox in grid:

<Grid x:Name="LayoutRoot"><TextBox ></Grid>

pavelsua

Loading...
Joined on 03-19-2008
Posts 9
03-31-2008 5:19 AM
Re: Re: Re: Empty TextBox and END key pressed

Sorry for previous post - it's not complete!

Step 2: add two event handlers to the Txt in Page.Loaded event handler

Txt.KeyDown += new KeyDownEventHandler(Page_KeyDown);

Txt.TextChanged += new RoutedEventHandler(Page_TextChanged);

Step 3: while textbox doesn't contain any text press END key and try to type something after that - Page_TextChanged never calls

pavelsua

Loading...
Joined on 03-19-2008
Posts 9
03-31-2008 5:22 AM
Re: Re: Re: Re: Empty TextBox and END key pressed

And here is a complete xaml just in case:

<UserControl x:Class="endTest.Page"

xmlns="http://schemas.microsoft.com/client/2007"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Width="400" Height="300">

<Grid x:Name="LayoutRoot" Background="White">

<TextBox x:Name="Txt" KeyDown="Page_KeyDown" TextChanged="Page_TextChanged" />

</Grid>

</UserControl>

pavelsua

Loading...
Joined on 03-19-2008
Posts 9
03-31-2008 7:10 AM
Re: Re: Re: Re: Empty TextBox and END key pressed

Oh. yes. I'm able to reproduce this issue. Additional to this, if you select the text and press "Delete" button after following your steps, it will crash the browser..

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlSync

Loading...
Joined on 09-16-2005
Singapore
Posts 2,295
03-31-2008 7:19 AM
Re: Re: Re: Re: Empty TextBox and END key pressed

So if I understand you correctly this issue appears only in 2003 server?

pavelsua

Loading...
Joined on 03-19-2008
Posts 9
03-31-2008 7:23 AM
Re: Re: Re: Re: Empty TextBox and END key pressed

pavelsua:
So if I understand you correctly this issue appears only in 2003 server?
 

I tested in Vista Home Premium and IE7 + Firefox 2.0.0.13. I got this error. but I tried with IE6 on WindowsXP when I was in Office. I think it was working fine. I have to double-check.   

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlSync

Loading...
Joined on 09-16-2005
Singapore
Posts 2,295
03-31-2008 9:11 PM
Re: Re: Re: Re: Empty TextBox and END key pressed

I have tested with IE6 on Windows XP. Yes. It is not working.  

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlSync

Loading...
Joined on 09-16-2005
Singapore
Posts 2,295
Page view counter