Skip to content
This repository
Browse code

MINOR Exclude buttons from focusing first elements in CMS edit form, …

…as it stuffs up the layout engine
  • Loading branch information...
commit 8adb259555f1d00478c01407ad93b101fc04a9d3 1 parent b4fd20d
Ingo Schommer authored September 19, 2011
2  admin/javascript/LeftAndMain.EditForm.js
@@ -45,7 +45,7 @@
45 45
 				window.onbeforeunload = function(e) {return self._checkChangeTracker(false);};
46 46
 				
47 47
 				// focus input on first form element
48  
-				this.find(':input:visible:first').focus();
  48
+				this.find(':input:visible:not(:submit):first').focus();
49 49
 				
50 50
 				// Optionally get the form attributes from embedded fields, see Form->formHtmlContent()
51 51
 				for(var overrideAttr in {'action':true,'method':true,'enctype':true,'name':true}) {

0 notes on commit 8adb259

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