1. #1
    Ext User
    Join Date
    Aug 2010
    Posts
    2
    Vote Rating
    0
    zet is on a distinguished road

      0  

    Default Pressing 'Enter' key that triggers a button causes issue on TextArea

    Pressing 'Enter' key that triggers a button causes issue on TextArea


    Hi,

    I'm using the code below to trigger buttons when the enter key is clicked in a Dialog. The problem arises when I have a TextArea in the Dialog. This implementation will not allow new lines in the TextArea because it will always trigger the buttons. Can anyone suggest how to fix this issue? Thanks

    new KeyNav(this) {
    @Override
    public void onEnter(ComponentEvent ce) {
    if (okButton.isVisible() && okButton.isEnabled()) {
    okButton.focus();
    okButton.fireEvent(Events.Select);
    } else if (applyButton.isVisible() && applyButton.isEnabled()) {
    applyButton.focus();
    applyButton.fireEvent(Events.Select);
    } else if (closeButton.isVisible())
    closeButton.fireEvent(Events.Select);
    }
    };

    -zet

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You can check the target element and if the targetelement is the TextArea, dont do your actions.

  3. #3
    Ext User
    Join Date
    Aug 2010
    Posts
    2
    Vote Rating
    0
    zet is on a distinguished road

      0  

    Default


    Quote Originally Posted by sven View Post
    You can check the target element and if the targetelement is the TextArea, dont do your actions.

    Thanks this worked.

Similar Threads

  1. Allow Pressing Enter key in the TextArea in EditorGrid
    By MickeyMiner in forum Ext GWT: Discussion
    Replies: 3
    Last Post: 8 Jul 2010, 6:46 AM
  2. Simulate tab key by pressing enter key
    By hpet in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 29 Jun 2009, 1:38 AM
  3. Issue when enter key pressed within textarea
    By vijaypr.chak in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 26 Aug 2008, 11:32 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi