Permalink
Browse files

MINOR: Disabled sort-input focus+button move if only 1 such field exists

  • Loading branch information...
1 parent 284360e commit eb77c4b05684c670906381a208719e5b152cd7ea Russell Michell committed Jan 9, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 javascript/GridField.js
View
@@ -40,8 +40,9 @@ jQuery(function($){
*/
$('fieldset.ss-gridfield input.ss-gridfield-sort').entwine({
onfocusin: function(e) {
- // Dodgy results in IE <=7
- if($.browser.msie && $.browser.version <= 7) {
+ // Dodgy results in IE <=7 & ignore if only one filter-field
+ countfields = $('fieldset.ss-gridfield input.ss-gridfield-sort').length;
+ if(($.browser.msie && $.browser.version <= 7) || countfields == 1) {
return false;
}
var eleInput = $(this);

0 comments on commit eb77c4b

Please sign in to comment.