×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    69

    Bug in TextField onTextChanged event

    I might have found a bug in a the component TextField in the Harmattan version:

    The code below should output the textField text when ever I change the text (change a letter). This works fine on my desktop system (Ubuntu), but fails on the N950 device, PR1.1 as well as on beta2:
    Code:
    	TextField {	 
    	    onTextChanged: {
    	      console.log(text)
    	    }   
    	}
    I figured out this works fine when I set the echoMode to anything but "Normal":
    Code:
    echoMode: TextInput.Password
    Can somebody confirm this?

    As a workaround I figured out I can use the mode "PasswordEchoOnEdit".
    According to http://harmattan-dev.nokia.com/docs/...#echoMode-prop this should show asterixes on all but the last letter. How ever for me it always shows all letters (N950 as well as on desktop system).
    So, is that even another bug?
    Last edited by CaCO3; 2011-10-29 at 01:04.

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Bug in TextField onTextChanged event

    TextField is working fine for me on PR1.1, Beta2 as well as Firmware virsion 39.5, without setting echo mode. You are not able to get logs Or not able to see text in text field?

  3. #3
    Registered User
    Join Date
    Aug 2011
    Posts
    32

    Re: Bug in TextField onTextChanged event

    I found that textChanged is emitted only when return is pressed, focus is switched off the field or I'm using sliding keyboard. When using the virtual keyboard, if I type H E L L O, I get "hello" as text property of the filed only after pressing return, and if I use backspace text changes to nothing even if there is "hell" shown. I don't know if it's a bug or "intended by design", but it bothers a little in my apps because I used a TextFiled to filter a listView and it isn't really live filtering since user has to keep pressing return after inserting a char, and the behavior with a RegExp validator is odd: let's say I don't want the user to input the '%' char, if using the virtual keyboard all the text written will get deleted if that char is included, instead it should just remove the % char. After this behavior I may that virtual KB isn't passing characters one by one to the text field, but rather as a package?

  4. #4
    Registered User
    Join Date
    Jul 2011
    Posts
    69

    Re: Bug in TextField onTextChanged event

    Quote Originally Posted by giovanni88 View Post
    I found that textChanged is emitted only when return is pressed, focus is switched off the field or I'm using sliding keyboard. When using the virtual keyboard, if I type H E L L O, I get "hello" as text property of the filed only after pressing return, and if I use backspace text changes to nothing even if there is "hell" shown. I don't know if it's a bug or "intended by design", but it bothers a little in my apps because I used a TextFiled to filter a listView and it isn't really live filtering since user has to keep pressing return after inserting a char, and the behavior with a RegExp validator is odd: let's say I don't want the user to input the '%' char, if using the virtual keyboard all the text written will get deleted if that char is included, instead it should just remove the % char. After this behavior I may that virtual KB isn't passing characters one by one to the text field, but rather as a package?
    This is exactly what I meant. It only passes the text, after it looses the focus.
    As it works as expected on my desktop system, i see it as a bug.
    This is also confirmed by the fact that it works correctly, when I use it as a password field.

    Beside of that, also the functionality as a password field has a bug:
    TextInput.PasswordEchoOnEdit - Displays all but the current character as asterixes.
    I understand it in that way, that always only the last character should be shown, the previous ones should be an asterix.
    How every it shows the whole password, until it looses the focus.
    The weird thing is, on the other built in programs, this seems to work correctly.

    I am wondering if it is even worth to creat a bug report, because the last bug report I wrote, Nokia confirmed, but never fixed, even it would be a very simple fix

Similar Threads

  1. TextField TextChanged event type
    By lelouch.lamperouge in forum Symbian
    Replies: 8
    Last Post: 2010-03-16, 09:26
  2. How to handle LostFocus event for TextField in J2ME?
    By anupdesai1248 in forum Mobile Java General
    Replies: 4
    Last Post: 2009-03-02, 18:15
  3. textfield text changed event?
    By mikecotic in forum Mobile Java General
    Replies: 4
    Last Post: 2008-11-12, 19:29
  4. S40 Emulator and TextField: No ItemState event?
    By je35 in forum Mobile Java General
    Replies: 0
    Last Post: 2005-11-11, 09:41
  5. Replies: 1
    Last Post: 2003-08-25, 11:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×