From f6801b3f3cc432983fa6cb8c87172fe2eb4e5498 Mon Sep 17 00:00:00 2001 From: Lupe Date: Wed, 16 Nov 2022 12:43:56 -0800 Subject: [PATCH 01/12] Remove autofocus from create new field page --- src/templates/settings/fields/_edit.twig | 1 - 1 file changed, 1 deletion(-) diff --git a/src/templates/settings/fields/_edit.twig b/src/templates/settings/fields/_edit.twig index 63eb7743b9e..df92c0c14d5 100644 --- a/src/templates/settings/fields/_edit.twig +++ b/src/templates/settings/fields/_edit.twig @@ -47,7 +47,6 @@ value: field.name, errors: field.getErrors('name'), required: true, - autofocus: true }) }} {{ forms.textField({ From c77ff03c82eba6ab1d732d488425ae7507a827dc Mon Sep 17 00:00:00 2001 From: Lupe Date: Wed, 16 Nov 2022 12:52:28 -0800 Subject: [PATCH 02/12] Remove autofocus from title field --- src/fieldlayoutelements/TitleField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fieldlayoutelements/TitleField.php b/src/fieldlayoutelements/TitleField.php index b60fedadae4..97040f3fac3 100644 --- a/src/fieldlayoutelements/TitleField.php +++ b/src/fieldlayoutelements/TitleField.php @@ -46,7 +46,7 @@ class TitleField extends TextField /** * @inheritdoc */ - public bool $autofocus = true; + public bool $autofocus = false; /** * @inheritdoc From 878429107d3ebef3a2b893e0981dc1c27972c799 Mon Sep 17 00:00:00 2001 From: Lupe Date: Wed, 16 Nov 2022 13:08:56 -0800 Subject: [PATCH 03/12] Remove focus on search input from index pages --- src/web/assets/cp/dist/cp.js | 2 +- src/web/assets/cp/dist/cp.js.map | 2 +- src/web/assets/cp/src/js/BaseElementIndex.js | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/web/assets/cp/dist/cp.js b/src/web/assets/cp/dist/cp.js index 6805b831774..68fdb7ebb74 100644 --- a/src/web/assets/cp/dist/cp.js +++ b/src/web/assets/cp/dist/cp.js @@ -1,2 +1,2 @@ -(function(){var __webpack_modules__={3839:function(){Craft.AddressesInput=Garnish.Base.extend({$container:null,$addBtn:null,$addBtnItem:null,$cards:null,init:function(t,e){var i=this;this.$container=$(t),this.setSettings(e,Craft.AddressesInput.defaults),this.$container.data("addresses")&&(console.warn("Double-instantiating an address input on an element"),this.$container.data("addresses").destroy()),this.$container.data("addresses",this),this.$addBtn=this.$container.find(".address-cards__add-btn"),this.$addBtnItem=this.$addBtn.closest("li"),this.$cards=this.$container.find("> .address-card");for(var s=0;s=this.settings.maxItems)){var e=$(t).appendTo(this.$tbody),i=e.find(".delete");this.settings.sortable&&this.sorter.addItems(e),this.$deleteBtns=this.$deleteBtns.add(i),this.addListener(i,"click","handleDeleteBtnClick"),this.totalItems++,this.updateUI()}},reorderItems:function(){var t=this;if(this.settings.sortable){for(var e=[],i=0;i=this.settings.maxItems?$(this.settings.newItemBtnSelector).addClass("hidden"):$(this.settings.newItemBtnSelector).removeClass("hidden"))}},{defaults:{tableSelector:null,noItemsSelector:null,newItemBtnSelector:null,idAttribute:"data-id",nameAttribute:"data-name",sortable:!1,allowDeleteAll:!0,minItems:0,maxItems:null,reorderAction:null,deleteAction:null,reorderSuccessMessage:Craft.t("app","New order saved."),reorderFailMessage:Craft.t("app","Couldn’t save new order."),confirmDeleteMessage:Craft.t("app","Are you sure you want to delete “{name}”?"),deleteSuccessMessage:Craft.t("app","“{name}” deleted."),deleteFailMessage:Craft.t("app","Couldn’t delete “{name}”."),onReorderItems:$.noop,onDeleteItem:$.noop}})},6872:function(){Craft.AssetImageEditor=Garnish.Modal.extend({$body:null,$footer:null,$imageTools:null,$buttons:null,$cancelBtn:null,$replaceBtn:null,$saveBtn:null,$focalPointBtn:null,$editorContainer:null,$straighten:null,$croppingCanvas:null,$spinner:null,$constraintContainer:null,$constraintRadioInputs:null,$customConstraints:null,canvas:null,image:null,viewport:null,focalPoint:null,grid:null,croppingCanvas:null,clipper:null,croppingRectangle:null,cropperHandles:null,cropperGrid:null,croppingShade:null,imageStraightenAngle:0,viewportRotation:0,originalWidth:0,originalHeight:0,imageVerticeCoords:null,zoomRatio:1,animationInProgress:!1,currentView:"",assetId:null,cacheBust:null,draggingCropper:!1,scalingCropper:!1,draggingFocal:!1,previousMouseX:0,previousMouseY:0,shiftKeyHeld:!1,editorHeight:0,editorWidth:0,cropperState:!1,scaleFactor:1,flipData:{},focalPointState:!1,maxImageSize:null,lastLoadedDimensions:null,imageIsLoading:!1,mouseMoveEvent:null,croppingConstraint:!1,constraintOrientation:"landscape",showingCustomConstraint:!1,saving:!1,renderImage:null,renderCropper:null,_queue:null,init:function(t,e){var i=this;this._queue=new Craft.Queue,this.cacheBust=Date.now(),this.setSettings(e,Craft.AssetImageEditor.defaults),null===this.settings.allowDegreeFractions&&(this.settings.allowDegreeFractions=Craft.isImagick),Garnish.prefersReducedMotion()&&(this.settings.animationDuration=1),this.assetId=t,this.flipData={x:0,y:0},this.$container=$('').appendTo(Garnish.$bod),this.$body=$('
').appendTo(this.$container),this.$footer=$('