Changes between Initial Version and Version 1 of Ticket #9474


Ignore:
Timestamp:
Jun 29, 2009, 6:43:50 AM (12 years ago)
Author:
bill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9474 – Description

    initial v1  
    1 The editor has code to save/restore it's value when the back/forward button is pressed, for example in the cases:
    2    1. navigate to another page and then hitting the back button
    3    2. press the browser's refresh button)
     1The editor has code to save/restore it's value if the user (accidentally) navigates away from the page, and then comes back (by pressing the back button).
    42
    53However, it's not working.
    64
    7 It's supposed to work by saving the value into a <textarea> on page unload.   The page designer must create a single <textarea> on the page that is shared by all Editors.  Then on page load, it checks if such a text area exists and restores it's value from there.
     5Editor.js creates a single <textarea> on the page that is shared by all Editors.  Each Editor is supposed to save it's value into that <textarea> on page unload. Then on page [re]load, it checks if such a <textarea> exists and restores it's value from there.
    86
    97The problems include:
    10   * value not restored, Editor gets confused because the split() on the textarea's value returns a "" for the first value
    11   * textarea is never cleared, so multiple back/forward's will create multiple entries in the textarea for a single editor  (there's a splice call in the code that doesn't do anything useful)
    12   * even if an Editor is destroyed, the onbeforeunload handler remains, trying to save the value on page unload
    13   * according to code coment the code to register an unload handler is only working on FF and IE
     8  * value not restored, Editor gets confused because the split() on the textarea's value returns a "" for the first entry
     9  * textarea is never cleared, so multiple navigations will create multiple entries in the textarea for a single editor  (there's a splice call in the code that doesn't do anything useful)
     10  * even if an Editor is destroyed, the onbeforeunload handler remains, trying to save the destroyed editor's value on page unload
     11  * according to the coment, the code to register an unload handler is only working on FF and IE
    1412