Changes between Initial Version and Version 1 of Ticket #9474
- Timestamp:
- Jun 29, 2009, 6:43:50 AM (13 years ago)
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) 1 The 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). 4 2 5 3 However, it's not working. 6 4 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 areaexists and restores it's value from there.5 Editor.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. 8 6 9 7 The problems include: 10 * value not restored, Editor gets confused because the split() on the textarea's value returns a "" for the first value11 * 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 unload13 * according to code comentthe code to register an unload handler is only working on FF and IE8 * 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 14 12