This commit is contained in:
2025-06-24 16:49:40 +00:00
parent 366544befc
commit 1041814823
4 changed files with 200 additions and 148 deletions

View File

@@ -121,6 +121,11 @@ export class DeesInputWysiwyg extends DeesInputBase<string> {
this.updateValue();
this.editorContentRef = this.shadowRoot!.querySelector('.editor-content') as HTMLDivElement;
// Add click handler to editor content
if (this.editorContentRef) {
this.editorContentRef.addEventListener('click', (e) => this.handleEditorClick(e));
}
// We now rely on block-level selection detection
// No global selection listener needed
@@ -300,7 +305,6 @@ export class DeesInputWysiwyg extends DeesInputBase<string> {
<div class="wysiwyg-container">
<div
class="editor-content ${this.draggedBlockId ? 'dragging' : ''}"
@click="${this.handleEditorClick}"
id="editor-content"
>
<!-- Blocks will be rendered programmatically -->