diff --git a/CHANGELOG.md b/CHANGELOG.md index af31e3376af..ad451d90141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,10 @@ - Fixed a bug where newly-created subfolders on the Assets index page could appear to have the wrong indentation. - Fixed a UI bug where renaming a newly-created volume subfolder didn’t appear to have any effect. - Fixed a bug where empty URL fields would be marked as changed, even when no change was made to them. ([#11908](https://github.com/craftcms/cms/issues/11908)) +- Fixed a UI bug where autosuggest menus weren’t getting filtered when first opened for inputs with existing values. ([#11896](https://github.com/craftcms/cms/issues/11896)) +- Fixed a bug where Entry Type condition rules weren’t working for conditions that were applied to a single element. ([#11914](https://github.com/craftcms/cms/issues/11914)) +- Fixed a bug where form action keyboard shortcuts weren’t available when a custom select menu was focused. ([#11919](https://github.com/craftcms/cms/issues/11919)) +- Fixed a bug where transforming an animated GIF into a WebP file would only include the first frame. ([#11889](https://github.com/craftcms/cms/issues/11889)) ### Security - Fixed XSS vulnerabilities. diff --git a/src/elements/conditions/entries/TypeConditionRule.php b/src/elements/conditions/entries/TypeConditionRule.php index 2122ad8ebed..1efeb1b7347 100644 --- a/src/elements/conditions/entries/TypeConditionRule.php +++ b/src/elements/conditions/entries/TypeConditionRule.php @@ -94,6 +94,6 @@ public function modifyQuery(ElementQueryInterface $query): void public function matchElement(ElementInterface $element): bool { /** @var Entry $element */ - return $this->matchValue((string)$element->getType()->id); + return $this->matchValue((string)$element->getType()->uid); } } diff --git a/src/image/Raster.php b/src/image/Raster.php index 97c00a1cbcb..3b73a66c5c7 100644 --- a/src/image/Raster.php +++ b/src/image/Raster.php @@ -214,6 +214,7 @@ public function crop(int $x1, int $x2, int $y1, int $y2): self $gif = $this->_instance->create($newSize); $gif->layers()->remove(0); + $this->_image->layers()->coalesce(); foreach ($this->_image->layers() as $layer) { $croppedLayer = $layer->crop($startingPoint, $newSize); $gif->layers()->add($croppedLayer); @@ -701,6 +702,7 @@ private function _getSaveOptions(?int $quality, ?string $extension = null): arra return ['jpeg_quality' => $quality, 'flatten' => true]; case 'gif': + case 'webp': return ['animated' => $this->_isAnimatedGif]; case 'png': diff --git a/src/templates/_includes/forms/autosuggest.twig b/src/templates/_includes/forms/autosuggest.twig index 48f28570fbb..e8fbb1beec7 100644 --- a/src/templates/_includes/forms/autosuggest.twig +++ b/src/templates/_includes/forms/autosuggest.twig @@ -47,7 +47,7 @@ new Vue({ data() { {% block data %} var data = {{ { - query: '', + query: (value ?? '')|lower, selected: '', filteredOptions: [], suggestions: suggestions ?? [], diff --git a/src/web/assets/garnish/dist/garnish.js b/src/web/assets/garnish/dist/garnish.js index d92e85c33d2..102c4b71673 100644 --- a/src/web/assets/garnish/dist/garnish.js +++ b/src/web/assets/garnish/dist/garnish.js @@ -1,3 +1,3 @@ /*! For license information please see garnish.js.LICENSE.txt */ -!function(){var t={55:function(t,e,i){var s=i(177),n=i(820),o=s.default;void 0===n.Garnish&&(n.Garnish=o),t.exports=s},820:function(t,e,i){"use strict";t.exports=function(){if("object"==typeof globalThis)return globalThis;var t;try{t=this||new Function("return this")()}catch(t){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==i.g)return i.g}return t}()},177:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return z}});var s=jQuery,n=i.n(s);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var r=function(){};function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}r.extend=function(t,e){var i=r.prototype.extend;r._prototyping=!0;var s=new this;i.call(s,t),s.base=function(){},delete r._prototyping;var n=s.constructor,o=s.constructor=function(){if(!r._prototyping)if(this._constructing||this.constructor==o)this._constructing=!0,n.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||i).call(arguments[0],s)};return o.ancestor=this,o.extend=this.extend,o.forEach=this.forEach,o.implement=this.implement,o.prototype=s,o.toString=this.toString,o.valueOf=function(t){return"object"==t?o:n.valueOf()},i.call(o,e),"function"==typeof o.init&&o.init(),o},r.prototype={extend:function(t,e){if(arguments.length>1){var i=this[t];if(i&&"function"==typeof e&&(!i.valueOf||i.valueOf()!=e.valueOf())&&/\bbase\b/.test(e)){var s=e.valueOf();e=function(){var t=this.base||r.prototype.base;this.base=i;var e=s.apply(this,arguments);return this.base=t,e},e.valueOf=function(t){return"object"==t?e:s},e.toString=r.toString}this[t]=e}else if(t){var n=r.prototype.extend;r._prototyping||"function"==typeof this||(n=this.extend||n);for(var h={toSource:null},a=["constructor","toString","valueOf"],l=r._prototyping?0:1;u=a[l++];)t[u]!=h[u]&&n.call(this,u,t[u]);for(var u in t)if(!h[u]){var c=Object.getOwnPropertyDescriptor(t,u);"undefined"!=o(c.value)?n.call(this,u,c.value):Object.defineProperty(this,u,c)}}return this}},r=r.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(t,e,i){for(var s in t)void 0===this.prototype[s]&&e.call(i,t[s],s,t)},implement:function(){for(var t=0;t=0;n--){var o=this._eventHandlers[n];o.type!==s[0]||s[1]&&o.namespace!==s[1]||o.handler!==e||this._eventHandlers.splice(n,1)}},trigger:function(t,e){var i,s,o,r={type:t,target:this};for(i=0;ithis.drag._maxMouseScrollY&&(this.drag._scrollProperty="scrollTop",this.drag._scrollAxis="Y",this.drag._scrollDist=Math.round((this.mouseY-this.drag._maxMouseScrollY)/2)))),this.drag._scrollProperty||this.settings.axis===W.Y_AXIS||(this.drag._winScrollLeft=W.$win.scrollLeft(),this.drag._minMouseScrollX=this.drag._winScrollLeft+W.BaseDrag.windowScrollTargetSize,this.mouseXthis.drag._maxMouseScrollX&&(this.drag._scrollProperty="scrollLeft",this.drag._scrollAxis="X",this.drag._scrollDist=Math.round((this.mouseX-this.drag._maxMouseScrollX)/2)))),this.drag._scrollProperty?(this.scrollProperty||(this.scrollProxy||(this.scrollProxy=this._scrollWindow.bind(this)),this.scrollFrame&&(W.cancelAnimationFrame(this.scrollFrame),this.scrollFrame=null),this.scrollFrame=W.requestAnimationFrame(this.scrollProxy)),this.scrollProperty=this.drag._scrollProperty,this.scrollAxis=this.drag._scrollAxis,this.scrollDist=this.drag._scrollDist):this._cancelWindowScroll()),this.onDrag()},stopDragging:function(){this.dragging=!1,this.onDragStop(),this._cancelWindowScroll()},addItems:function(t){t=n().makeArray(t);for(var e=0;e=W.BaseDrag.minMouseDist&&this.startDragging()),this.dragging&&this.drag(!0)},_handleMouseUp:function(t){this.removeAllListeners(W.$doc),this.dragging&&this.stopDragging(),this.$targetItem=null},_scrollWindow:function(){this._.scrollPos=W.$scrollContainer[this.scrollProperty](),W.$scrollContainer[this.scrollProperty](this._.scrollPos+this.scrollDist),this["mouse"+this.scrollAxis]-=this._.scrollPos-W.$scrollContainer[this.scrollProperty](),this["realMouse"+this.scrollAxis]=this["mouse"+this.scrollAxis],this.drag(),this.scrollFrame=W.requestAnimationFrame(this.scrollProxy)},_cancelWindowScroll:function(){this.scrollFrame&&(W.cancelAnimationFrame(this.scrollFrame),this.scrollFrame=null),this.scrollProperty=null,this.scrollAxis=null,this.scrollDist=null},_deinitItem:function(t){this.removeAllListeners(t),n().removeData(t,"drag")}},{minMouseDist:1,windowScrollTargetSize:25,defaults:{handle:null,axis:null,ignoreHandleSelector:"input, textarea, button, select, .btn",onDragStart:n().noop,onDrag:n().noop,onDragStop:n().noop}}),c=a.extend({$container:null,$all:null,$options:null,init:function(t){this.$container=n()(t),this.$container.data("checkboxSelect")&&(console.warn("Double-instantiating a checkbox select on an element"),this.$container.data("checkboxSelect").destroy()),this.$container.data("checkboxSelect",this);var e=this.$container.find("input");this.$all=e.filter(".all:first"),this.$options=e.not(this.$all),this.addListener(this.$all,"change","onAllChange")},onAllChange:function(){var t=this.$all.prop("checked");this.$options.prop({checked:t,disabled:t})},destroy:function(){this.$container.removeData("checkboxSelect"),this.base()}}),d=a.extend({$target:null,options:null,$menu:null,showingMenu:!1,init:function(t,e,i){this.$target=n()(t),this.$target.data("contextmenu")&&(console.warn("Double-instantiating a context menu on an element"),this.$target.data("contextmenu").destroy()),this.$target.data("contextmenu",this),this.options=e,this.setSettings(i,W.ContextMenu.defaults),W.ContextMenu.counter++,this.enable()},buildMenu:function(){this.$menu=n()('