none
TextBox Enter KeyMap RRS feed

  • Question

  • Hello,

    The project has textbox and button. Click Buton'un value event textbox (the other party) sends. You see the same thing with the buton.click keymap.enter textbox event, but the value of the TextBox is sending both stroke event, the bottom line is that concluding normally enter into a textbox "<br>" or "\n" is taken. How do I prevent this? I just want to send the value. I want to get off shift + enter, the bottom line is done ... Good work ...

    NOTE: Using ExtJS
    Monday, December 17, 2012 10:25 AM

Answers

  • I found the answer I asked ...

    enableKeyEvents:true,
    listeners: { 
       keypress: function(field, evt, eOpts) {    
            if (evt.getKey() == evt.ENTER) {      
                 evt.stopEvent();    
            }  
       } 
    }

    and

    enableKeyEvents:true,
    listeners: {
      keypress: function(field, evt, eOpts) {
        if (evt.getKey() == evt.ENTER) {
          evt.preventDefault();
        }
      } 
    }

    is in the form of.

    • Marked as answer by Mücahid Wednesday, December 19, 2012 8:10 PM
    Wednesday, December 19, 2012 8:10 PM

All replies

  • Hi there--

    Is that a question or or a discussion? Is this related to Project Server customization?

    It looks like that you have erroneously posted your question in a user forum dedicated to Project Server , an enterprise project management tool.  I would suggest that you search the correct forum for your question:
    http://social.technet.microsoft.com/Forums/en/categories

    You can also post the question to find :
    http://social.technet.microsoft.com/Forums/en/whatforum/threads

    Hope this helps. 


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Tuesday, December 18, 2012 5:04 AM
  • I found the answer I asked ...

    enableKeyEvents:true,
    listeners: { 
       keypress: function(field, evt, eOpts) {    
            if (evt.getKey() == evt.ENTER) {      
                 evt.stopEvent();    
            }  
       } 
    }

    and

    enableKeyEvents:true,
    listeners: {
      keypress: function(field, evt, eOpts) {
        if (evt.getKey() == evt.ENTER) {
          evt.preventDefault();
        }
      } 
    }

    is in the form of.

    • Marked as answer by Mücahid Wednesday, December 19, 2012 8:10 PM
    Wednesday, December 19, 2012 8:10 PM