fix(wysiwyg): Fix text selection detection for formatting menu in Shadow DOM
- Update selection detection to properly handle Shadow DOM boundaries - Use getComposedRanges API correctly according to MDN documentation - Add direct selection detection within block components - Dispatch custom events from blocks when text is selected - Fix formatting menu positioning using selection rect from events
This commit is contained in:
@ -162,9 +162,11 @@ export class DeesFormattingMenu extends DeesElement {
|
||||
}
|
||||
|
||||
public show(position: { x: number; y: number }, callback: (command: string) => void | Promise<void>): void {
|
||||
console.log('FormattingMenu.show called:', { position, visible: this.visible });
|
||||
this.position = position;
|
||||
this.callback = callback;
|
||||
this.visible = true;
|
||||
console.log('FormattingMenu.show - visible set to:', this.visible);
|
||||
}
|
||||
|
||||
public hide(): void {
|
||||
|
Reference in New Issue
Block a user