File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
modules/@apostrophecms/layout-widget/ui/apos/components Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -196,10 +196,16 @@ export default {
196196 watch: {
197197 // Intercept the columns focus, and emphasize the layout widget instead.
198198 async focusedWidget (widgetId ) {
199- if (! this .parentOptions .widgetId ) {
199+ if (! widgetId || ! this .parentOptions .widgetId ) {
200200 return ;
201201 }
202+
202203 await this .$nextTick ();
204+ if (widgetId === this .parentOptions .widgetId && this .layoutMode === ' layout' ) {
205+ this .setFocusedWidget (null , this .areaId );
206+ this .emphasizeGrid ();
207+ return ;
208+ }
203209
204210 if (this .layoutColumnWidgetDeepIds .includes (widgetId)) {
205211 this .emphasizeGrid ();
@@ -215,6 +221,15 @@ export default {
215221 ) {
216222 this .setHoveredWidget (this .parentOptions .widgetId , this .areaId );
217223 }
224+ },
225+ layoutMode (newMode ) {
226+ if (newMode === ' layout' ) {
227+ this .setFocusedWidget (null , this .areaId );
228+ this .emphasizeGrid ();
229+ } else {
230+ this .setFocusedWidget (this .parentOptions .widgetId , this .areaId );
231+ this .deEmphasizeGrid ();
232+ }
218233 }
219234 },
220235 mounted () {
You can’t perform that action at this time.
0 commit comments