editor: disable f2 shortcut if selected widget has no label property

This commit is contained in:
jean-emmanuel 2025-03-13 20:13:33 +01:00
parent 8655a2866c
commit 1c984a57e0

View file

@ -455,6 +455,7 @@ class Editor {
break
case 'f2':
if (!this.selectedWidgets.length) return
if (this.selectedWidgets[0].props.top === undefined) return
if (!this.inspector.expandedCategories.includes('style')) {
var header = DOM.get(this.inspector.container, '.category-header[data-name="style"]')[0]
if (header) {