Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-01-31 15:11:03

tdxdave
New member
Registered: 2007-01-31
Posts: 5

Correct behavior when user navigates back to a page with Xin

A user is editing content with Xinha editor. Navigates to another page. Clicks back to go back to Xinha editor page. The content the user entered is gone. This is not the expected behavior. Does this always happen with xinha or might it be a configuration issue?

Offline

#2 2007-01-31 16:44:24

koto
Xinha Pro
Registered: 2006-01-09
Posts: 58

Re: Correct behavior when user navigates back to a page with Xin

This is an expected behaviour. Xinha initalizes with contents of TEXTAREA element associated with it. Is the user navigates to the other page without submitting the form, there is no way for the server serving HTML page to determine "previous" state of the textarea.

Some browsers do populate textareas and/or input field based on their cached contents, but AFAIK Xinha can't access these values.

If you want to be able to save the content while editing the document, please look at the SaveSubmit plugin.

Offline

#3 2007-01-31 16:48:15

tdxdave
New member
Registered: 2007-01-31
Posts: 5

Re: Correct behavior when user navigates back to a page with Xin

In this case the server is never contacted, the page is loaded from the browser cache.
I asked an associate about other wysiwyg editors, and he said TinyMCE has the expected behavior (ie: edits are not lost). I will research some more. Perhaps there is some way to populate a placeholder textarea and reload xinha with it when the browser goes back to the cached page.

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#4 2007-01-31 18:51:15

tdxdave
New member
Registered: 2007-01-31
Posts: 5

Re: Correct behavior when user navigates back to a page with Xin

Ie: http://tinymce.moxiecode.com/example_fu … ample=true This works as expected. If you enter content in tinymce then browse to a new page then click "back" the content is still there.

This: http://xinha.gogo.co.nz/xinha-nightly/e … ample.html does not.

Offline

#5 2007-01-31 20:00:23

tdxdave
New member
Registered: 2007-01-31
Posts: 5

Re: Correct behavior when user navigates back to a page with Xin

I found this code

  // add a handler for the "back/forward" case -- on body.unload we save
  // the HTML content into the original textarea.
  Xinha.prependDom0Event(
    window,
    'unload',
    function()
    {
      textarea.value = editor.outwardHtml(editor.getHTML());
        return true;
    }
  );

Which appears to save the content in the textarea before you leave the page. So it looks like the problem is when I come _back_ to the page its somehow getting the wrong value.

Offline

#6 2007-02-01 03:40:47

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Correct behavior when user navigates back to a page with Xin

yeah I think by the time an onunload function has been called, any changes are going to be lost as they're not remembered by the browser past that point


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#7 2007-02-01 08:14:14

tdxdave
New member
Registered: 2007-01-31
Posts: 5

Re: Correct behavior when user navigates back to a page with Xin

Interesting if the browser loses the changes. I poked around the source of TinyMCE and it appears to do the same thing. One thing I did not see if moving the textarea inside the iframe. That is Xinha changes the DOM and moves the textarea for the form inside the iframe, at least that is what appears to happen.

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#8 2007-02-01 09:06:59

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Correct behavior when user navigates back to a page with Xin

Please continue the discussion here: http://xinha.python-hosting.com/ticket/929

Offline

Board footer

Powered by FluxBB