question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strange behavior when entering or pasting new content then double clicking, acts like undo

See original GitHub issue

I’m experiencing an issue where the mouse left click acts like a undo (backspace).
If I enter text, double clicking anywhere acts like an undo. If I paste and double click it undoes the pasting. If I populate the editor with content, double click work correctly.

Any work around?

Below is my configuration.

  <angular-editor
                  #messageEditor
                  formControlName="message"
                  [config]="editorConfig"
                  id="messageEditor"
                ></angular-editor>

 message: new FormControl('', [Validators.required]);
 editorConfig: AngularEditorConfig = {
      editable: true,
      spellcheck: true,
      sanitize: true,
      toolbarHiddenButtons: [['link', 'unlink', 'insertVideo', 'insertImage']],
      // height: '30vh'
      height: '15rem',
      minHeight: '5rem'
    };

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
kambbadocommented, Dec 2, 2019

Here the issue, angular-editor cannot be inside a label. For whatever reason the label changes the mouse event order.

This breaks the component

<label class="col-form-label col-md-12 text-left">
               Message<span class="text-danger">*</span>
               <angular-editor
                 #messageEditor
                 formControlName="message"
                 [config]="editorConfig"
                 id="messageEditor"
               ></angular-editor>
             </label>

This works

<label class="col-md-12">
              Message<span class="text-danger">*</span>
              </label>
              <angular-editor
                #messageEditor
                formControlName="message"
                [config]="editorConfig"
                id="messageEditor"
              ></angular-editor>

Changing the label tag to a span tag works

0reactions
ArthCodeUAcommented, Jun 27, 2020

Thanks so much, had same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excel showing pasted text when double clicking on another cell
Double -click sounds like a bad idea because it enters in-cell edit mode and the behaviour you describe seems like the correct response...
Read more >
Must now double click cells to paste w/correct formatting
Strange. Until recently NO double clicking of cells required - just copy, paste and go. And formatting stayed. Have attempted new workbook, ...
Read more >
When I click my mouse, it sometimes double-clicks
When set very low, clicking at two different times may be interpreted as a double-click instead.
Read more >
Firefox copy feature always adds extra space before or after ...
I'm used to Opera and IE where by when I double click some text the ... way to alter this behavior so that...
Read more >
How to Fix a Mouse That Double-Clicks on a Single Click in ...
If you've walked through all the above steps and your mouse is still double-clicking all the time, it may be faulty. To test...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found