Yii Framework Forum: Cgridview Filters Triggers Only Once When Using Enter Key (Firefox) - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cgridview Filters Triggers Only Once When Using Enter Key (Firefox) Rate Topic: -----

#1 User is offline   Provencal le gaulois 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 21-May 14

Posted 21 May 2014 - 09:57 AM

Hi and first, thank you for this great framework !

I am working with :
Yii 1.1.14
JQuery 1.11
Firefox 25

I am having some trouble with the CGridView filters in Firefox.
If I trigger a filter by using enter key once, it become impossible to trigger another filtering when loosing focus or on the value change of a select


Thank you by advance for any answer !
0

#2 User is offline   Provencal le gaulois 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 21-May 14

Posted 22 May 2014 - 04:32 AM

I found an issue on gitHub about that matter, and posted a solution in the comments. (github.com/yiisoft/yii/issues/2881) (Sorry I am not allowed to post links)

The problem was the keyCode propertie of the javascript event which is not recognised by all browser. The solution is to try and use the charCode instead like this :

if((event.keyCode ? event.keyCode : event.charCode) !==13)


instead of

if(event.keyCode !== 13)

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users