IgniteUI / ignite-ui

Ignite UI for jQuery by Infragistics
https://bit.ly/2kuu1fT
Other
477 stars 83 forks source link

igHTMLEditor: copy pasting loses focus #2181

Open PatelShruti411 opened 2 years ago

PatelShruti411 commented 2 years ago

Description

I have some logic to change some styles when user copy paste inside editor. and because of this I lose focus and have to click inside the editor to see the cursor. I have attached the sample code. I have also tried some solutions I found online, but nothing works.

Here is the link for online solution I found. I have also added that in my code to test it out https://stackoverflow.com/questions/1181700/set-cursor-position-on-contenteditable-div followed the ans with 101 ratings

Steps to reproduce

  1. Step 1 run the code
  2. Step 2 copy paste any content from any document

Result

losing focus and have to click inside editor if wants to type anything

Expected result

the focus should remain inside editor

Attachments

Attach a sample if available, and screenshots, if applicable.
focusIssue.zip