Skip to content
This repository
Browse code

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

  • Loading branch information...
commit eb77c4b05684c670906381a208719e5b152cd7ea 1 parent 284360e
Russell Michell authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  javascript/GridField.js
5  javascript/GridField.js
@@ -40,8 +40,9 @@ jQuery(function($){
40 40
 	 */
41 41
 	$('fieldset.ss-gridfield input.ss-gridfield-sort').entwine({
42 42
 		onfocusin: function(e) {
43  
-			// Dodgy results in IE <=7
44  
-			if($.browser.msie && $.browser.version <= 7) {
  43
+			// Dodgy results in IE <=7 & ignore if only one filter-field
  44
+			countfields = $('fieldset.ss-gridfield input.ss-gridfield-sort').length;
  45
+			if(($.browser.msie && $.browser.version <= 7) || countfields == 1) {
45 46
 				return false;
46 47
 			}
47 48
 			var eleInput = $(this);

0 notes on commit eb77c4b

Please sign in to comment.
Something went wrong with that request. Please try again.