Skip to content
Browse files

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

…as it stuffs up the layout engine
  • Loading branch information...
1 parent b4fd20d commit 8adb259555f1d00478c01407ad93b101fc04a9d3 @chillu chillu committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 admin/javascript/LeftAndMain.EditForm.js
2 admin/javascript/LeftAndMain.EditForm.js
@@ -45,7 +45,7 @@
window.onbeforeunload = function(e) {return self._checkChangeTracker(false);};
// focus input on first form element
- this.find(':input:visible:first').focus();
+ this.find(':input:visible:not(:submit):first').focus();
// Optionally get the form attributes from embedded fields, see Form->formHtmlContent()
for(var overrideAttr in {'action':true,'method':true,'enctype':true,'name':true}) {

0 comments on commit 8adb259

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