My favorites | Sign in
Google
                
New issue | Search
for
| Advanced search | Search tips
Issue 1214: RichText content is lost when the widget is removed & re-added.
1 person starred this issue and may be notified of changes. Back to list
 
Reported by gwt.team.jgw, Jun 11, 2007
Found in GWT Release:
1.4 RC1

Detailed description:
When a RichText area has content, and is then removed/re-added, it will
wipe that content. I believe this happens because the init/hook/unhook code
in RichTextAreaImpl always creates a new IFrame.

Workaround if you have one:
Developers could save the state manually, but this really shouldn't be
necessary.
Comment 1 by hugo.a.garcia, Jun 25, 2007
This issue is related to  issue 1293  (
http://code.google.com/p/google-web-toolkit/issues/detail?id=1293 )

In  issue 1293  I do the add and remove by creating a new instance of RichTextArea. I
am forced to use a field to save the html before removing the RichTextArea and to set
the html from that field once the new instance is loaded and the waiting timer has
been called. The reason I took this approach is because as mentioned above, a not
initiliazed exception is thrown when calling UIObject.setVisible(boolean visible) on
the Panel that contains the RichTextArea thus removing and adding doens't quite work.
Maybe the same goes for setVisible?

Any unit test written for this should be able to pass after multiple adds/remove of
the widget. setVisible should probably be also be tested. There is a catch where the
html is properly set and can be get from a visible RichTextArea BUT the RichTextArea
does NOT display the html (Behaviour documented in  Issue 1293 ).
Comment 2 by gwt.team.jgw, Jul 10, 2007
(No comment was entered for this change.)
Labels: -Priority-Medium Priority-High
Comment 3 by gwt.team.jgw, Jul 11, 2007
(No comment was entered for this change.)
Labels: -Priority-High Priority-Critical
Comment 4 by gwt.team.jgw, Jul 17, 2007
RichTextAreaImplStandard does not, in fact, recreate the iframe each time it's
initialized. What's happening is that every browser except for IE wipes the dynamic
contents of an iframe when it's removed from the DOM and re-added. We're going to
have to maintain the contents manually and put them back upon re-initialization.
Summary: RichText content is lost when the widget is removed & re-added.
Status: Started
Comment 5 by gwt.team.jgw, Jul 24, 2007
I added code in RichTextAreaImplStandard.java to preserve the iframe's contents when
an RTA is removed & re-added. There is also a test now to ensure this doesn't get
broken in the future.
Status: ReviewPending
Comment 6 by gwt.team.knorton, Jul 25, 2007
(No comment was entered for this change.)
Cc: gwt.team.knorton gwt.team.rdayal
Labels: ReviewBy-knorton ReviewBy-rdayal
Comment 8 by gwt.team.jgw, Aug 13, 2007
Fix committed as r1305.
Status: FixedNotReleased
Comment 9 by gwt.team.scottb, Aug 20, 2007
1.4 RC2 now released.
Status: Fixed
Comment 10 by sumitcha...@google.com, Apr 28, 2008
 
Owner: jgw
Comment 11 by knorton@google.com, Apr 29, 2008
 
Comment 12 by knorton@google.com, Apr 29, 2008
 
Comment 13 by knorton@google.com, Apr 29, 2008
 
Cc: -gwt.team.knorton knor...@google.com
Comment 14 by sumitcha...@google.com, May 02, 2008
 
Cc: -gwt.team.rdayal rda...@google.com
Sign in to add a comment