Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

discard keyboard on view touch, or keyboard toolbar "Done" button?

Hi there,

I have a problem with hiding the keyboard if a "view" or "window" received a touch, just like on Safari!

Alternative resolve could be a toolbar "Done" button like on Safari!

I cannot implement any of them!

Here is an example!
var win2 = Ti.createwindow … etc!

var view = Ti.createView … etc!

win2.add(view);

var text1 = Ti.create a text field … etc!

view.add(text1);

// Now if this text1 has a current event of focus(); but I do not want to hit return, I just used to hit the view to discard the keyboard.

// I did this

view.addEventListener('click', func(){
text1.blur(); // does NOT work!
});

NOTE: all of this code is just a typing short cut, I know it's not the correct syntax! I just wanted to explain

a help is much appreciated!

— asked June 21st 2010 by Sam Al
  • "done"
  • button?
  • discard
  • keyboard
  • on
  • or
  • toolbar
  • touch
  • view
0 Comments

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.