karthick2014 / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
0 stars 0 forks source link

Last Keystroke not being recorded when saving dynamically #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a rather odd scenario that can be reproduced in both IE7, FF3, and
Chrome. The issue is that I have a set of wysiwyg text areas that are
loaded dynamically using AJAX, and they are also saved using AJAX - however
the last keystroke does not get recorded prior to clicking the save button!

Loading the textboxes is easy using $obj.wysiwyg() with the AJAX callback,
however I cannot figure a way to get it to grab that last keystroke. This
even includes a CTRL+V to paste... if no other key is pressed, the text
area doesn't register any input at all!

I tried manually setting the autoSave in the options map, but then noticed
that it defaults to autoSave anyway. I couldn't see any other place where
an onBlur or other lost-focus event might trigger an automatic save.

Best I can tell the editor saves the final keystroke when submitted via
conventional methods, however I cannot get it to work using a dynamic AJAX
submission.

The save process is triggered via the onclick event of a Save hyperlink.
The onclick initiates the AJAX call and submits the textarea contents by
accessing the original textarea controls value attribute.

Any ideas? I am current with JWYSIWYG (0.4) and using JQuery 1.2.6, packed.

Original issue reported on code.google.com by switch...@gmail.com on 19 Nov 2008 at 12:38

GoogleCodeExporter commented 8 years ago
help why despear the lask char when trying send the textarea content whit 
Jquery post?

Original comment by glor...@gmail.com on 20 Nov 2008 at 4:23

GoogleCodeExporter commented 8 years ago
I've think I fixedd at Issue 47.

Original comment by joksnet on 20 Nov 2008 at 4:36

GoogleCodeExporter commented 8 years ago
Issue #47 definitely fixed it. For those using the packed version of 0.4, just 
search
for keydown and replace it with keyup and the issue will be gone.

Thanks for the reply, and sorry for the dup issue!

Original comment by switch...@gmail.com on 20 Nov 2008 at 7:45

GoogleCodeExporter commented 8 years ago

Original comment by joksnet on 21 Nov 2008 at 12:44