bergie / hallo

Simple rich text editor (contentEditable) for jQuery UI
http://hallojs.org/
MIT License
2.43k stars 316 forks source link

Wait for the paste event to complete before trying to read the results #219

Open jdelStrother opened 10 years ago

jdelStrother commented 10 years ago

Hi, I ran into a problem with Hallo with users who use the GUI to paste text, rather than using ⌘V like a regular human being. The paste event occurs before the text is actually pasted in, so editor doesn't yet contain the pasted text when checkModified occurs. It happens to work for ⌘V because you also get a keyup event immediately afterward.

How about delaying the checkModified function like so?