Author Topic: press "enter" goto next editable column not work in 2.2  (Read 3799 times)

lsl

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
press "enter" goto next editable column not work in 2.2
« on: September 23, 2014, 02:49:44 pm »
For the previous version ,

if I put this code in program
  obj.editModel= { saveKey: $.ui.keyCode.ENTER  }

, it will move to next field if I press "enter".

However, it will not be for the version 2.2. Does it  want to change any code to do so?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: press "enter" goto next editable column not work in 2.2
« Reply #1 on: September 23, 2014, 11:37:38 pm »
It's changed in 2.2.0 to make its behavior different from Tab key.

lsl

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: press "enter" goto next editable column not work in 2.2
« Reply #2 on: September 24, 2014, 07:43:29 am »
How can I get back this event?

As the end users are familiar with the enter key, they don't accept to use "tab" to go to next field.

lsl

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: press "enter" goto next editable column not work in 2.2
« Reply #3 on: October 21, 2014, 08:03:56 am »
I has just passed the version 2.2 to the end user to test it. They reported that it was lost the focus after press the enter but it was gone to the next field previously. They highly recommend to get back the entry key. But at least, how to avoid the lost of the focus and change from edit mode to non-edit mode? Can you help me?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: press "enter" goto next editable column not work in 2.2
« Reply #4 on: October 21, 2014, 10:11:20 am »
Change from edit mode to non-edit mode upon enter key can be prevented by returning false in editorKeyDown event

           editorKeyDown: function(evt,  ui){
               if(evt.keyCode == $.ui.keyCode.ENTER){
                   return false;
               }
           }

http://jsfiddle.net/nsswbmah/