Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unable to click focus the editor when adding a menu #580

Open
A-Rushton opened this issue Sep 23, 2024 · 1 comment
Open

[Bug]: Unable to click focus the editor when adding a menu #580

A-Rushton opened this issue Sep 23, 2024 · 1 comment

Comments

@A-Rushton
Copy link

What happened?

Unable to click the editor to focus, the class ProseMirror-focused appears then disappears instantly. I can tab the editor into focus but not click.

This only occurs when i add the ngx-editor-menu, and the editor itself works fine without it. Below is the snippet of code used for it. This is a component that gets used in multiple places in the app and the issue occurs everywhere.

<div class="rich-text-editor">
  <h4 *ngIf="title">{{title}}</h4>
  <label>
    <span *ngIf="subTitle" class="subtitle">{{subTitle}}</span>
    <div class="NgxEditor__Wrapper">
      <ngx-editor-menu [editor]="editor"></ngx-editor-menu>
      <ngx-editor [editor]="editor"
                  [(ngModel)]="value"
                  [disabled]="disabled"
                  [placeholder]="placeholder">
      </ngx-editor>
    </div>
  </label>
</div>

Version

18.0.0

Angular Version

17.2.2

What browsers are you seeing the problem on?

Chrome

Link to reproduce

No response

Relevant log output

No response

Willing to submit a PR?

None

@A-Rushton
Copy link
Author

Found the issue was with the editor being nested inside of a label... The label must have been focusing the menu rather than the editor - potential pitfall?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant