OK, reported: http://code.google.com/p/google-web-toolkit/issues/detail?id=4089
btw - will IE clean up memory when creating objects that are then not used again? Or is does creating new objects just keep using more and more memory? Thanks, Mark On Sep 30, 1:21 pm, Ian Bambury <[email protected]> wrote: > I should report it as a bug if you can't find an existing one. > I'm pretty sure it's IE mucking about, nit a GWT problem per se, but I > expect they'll want to know to see if they can work around it. > > IE and iframes are weird. In your example, if you set focus false on the RTA > just before you hide it, the whole of IE goes to the back of the desktop > window z-index. That used to happen in GWT way back, caused by other > conditions (something to do with the iframe GWT runs in, IIRC.) > > Ian > > http://examples.roughian.com > > 2009/9/30 mwaschkowski <[email protected]> > > > > > > > OK, thanks Ian! > > > I surmise from your post that I should just create one RTA and re-use > > it, I'll give that a try...ya, works fine and fixes the issue. Not > > sure if I should fill out a bug report or not... > > > I assume that the resources DO NOT get cleaned up once I don't have > > references to the dialog box anymore?? > > > Thanks, > > > Mark > > > On Sep 29, 6:20 pm, Ian Bambury <[email protected]> wrote: > > > You can cut out quite a lot of that code and still get the same effect. > > > And then (or now) all you have to do is to leave the cursor in the rich > > text > > > area and cancel (or do anything else to hide it). > > > > Because you are leaving RTAs lying about but not visible, and because the > > > RTA is in an IFRAME, and because the focus remains in the iframe and > > because > > > it's not visible, you end up with the focus stuck in an invisible frame. > > At > > > least, I think that's the problem. > > > > Yes, it probably shouldn't do that, but on the other hand, if you stop > > > leaving them lying about...if not for the focus problem, then for the > > sake > > > of your users' memory. > > > > You will probably save yourself a lot of pain and gnashing of teeth if > > you > > > give up on RTAs now. They may be OK if you really don't mind what html > > and > > > JS your users paste in there. > > > > Ian > > > >http://examples.roughian.com > > > > 2009/9/29 mwaschkowski <[email protected]> > > > > > I forgot to add, but the following is a workaround, and makes both > > > > the TextBox and RichTextArea editable. > > > > > categoryTextBox.addClickHandler(new ClickHandler() { > > > > @Override > > > > public void onClick(ClickEvent event) { > > > > categoryTextBox.setFocus(true); > > > > categoryTextBox.setCursorPos(0); > > > > } > > > > }); > > > > > On Sep 29, 2:37 pm, mwaschkowski <[email protected]> wrote: > > > > > Not sure why, but the below code stops working in IE (works fine for > > > > > me in chrome). > > > > > > In IE, do the following: > > > > > > 1) click Show Dialog > > > > > 2) enter '1' into the TextBox AND into the RichTextArea > > > > > 3) press cancel > > > > > 4) click Show Dialog > > > > > > On my box, both the TextBox and RichTextArea become un-editable (like > > > > > setEnabled(false) was called). > > > > > > Other people notice the same? If so, I'll fill out a bug report. If > > > > > I'm doing something incorrectly, just let me know... > > > > > > Thanks, > > > > > > Mark > > > > > > package com.test.client; > > > > > > import com.google.gwt.core.client.EntryPoint; > > > > > import com.google.gwt.event.dom.client.ClickEvent; > > > > > import com.google.gwt.event.dom.client.ClickHandler; > > > > > import com.google.gwt.user.client.ui.Button; > > > > > import com.google.gwt.user.client.ui.DialogBox; > > > > > import com.google.gwt.user.client.ui.FlexTable; > > > > > import com.google.gwt.user.client.ui.HorizontalPanel; > > > > > import com.google.gwt.user.client.ui.Label; > > > > > import com.google.gwt.user.client.ui.PopupPanel; > > > > > import com.google.gwt.user.client.ui.RichTextArea; > > > > > import com.google.gwt.user.client.ui.RootPanel; > > > > > import com.google.gwt.user.client.ui.TextBox; > > > > > import com.google.gwt.user.client.ui.VerticalPanel; > > > > > > /** > > > > > * Entry point classes define <code>onModuleLoad()</code>. > > > > > */ > > > > > public class RichTextAreaTest implements EntryPoint { > > > > > > /** > > > > > * This is the entry point method. > > > > > */ > > > > > public void onModuleLoad() { > > > > > > Button showButton = new Button("Show", new > > ClickHandler() > > > > { > > > > > @Override > > > > > public void onClick(ClickEvent event) { > > > > > PopupPanel popup = getPopup(); > > > > > popup.show(); > > > > > } > > > > > }); > > > > > > Button showDialogButton = new Button("Show Dialog", > > new > > > > ClickHandler > > > > > () { > > > > > public void onClick(ClickEvent event) { > > > > > DialogBox dialogBox = getDialogBox(); > > > > > dialogBox.setAutoHideEnabled(true); > > > > > dialogBox.show(); > > > > > } > > > > > }); > > > > > > RootPanel.get().add(showButton); > > > > > RootPanel.get().add(showDialogButton); > > > > > } > > > > > > private DialogBox getDialogBox(){ > > > > > final DialogBox db = new DialogBox(); > > > > > > Label categoryLabel = new Label("Category"); > > > > > TextBox categoryTextBox = new TextBox(); > > > > > > Label contentLabel = new Label("Content"); > > > > > RichTextArea contentTextArea = new RichTextArea(); > > > > > > //setup inputs > > > > > FlexTable table = new FlexTable(); > > > > > table.setWidget(0, 0, categoryLabel); > > > > > table.setWidget(0, 1, categoryTextBox); > > > > > table.setWidget(1, 0, contentLabel); > > > > > table.setWidget(1, 1, contentTextArea); > > > > > //if above gets commented out, then everything works > > as > > > > expected > > > > > > //setup buttons > > > > > Button cancelButton = new Button("Cancel", new > > > > ClickHandler() { > > > > > @Override > > > > > public void onClick(ClickEvent event) { > > > > > db.hide(); > > > > > } > > > > > }); > > > > > > HorizontalPanel hp = new HorizontalPanel(); > > > > > hp.add(cancelButton); > > > > > > VerticalPanel mainPanel = new VerticalPanel(); > > > > > mainPanel.add(table); > > > > > mainPanel.add(hp); > > > > > > db.add(mainPanel); > > > > > return db; > > > > > } > > > > > > private PopupPanel getPopup() { > > > > > final PopupPanel popup = new PopupPanel(true); > > > > > VerticalPanel panel = new VerticalPanel(); > > > > > panel.add(new TextBox()); > > > > > panel.add(new RichTextArea()); > > > > > popup.setWidget(panel); > > > > > return popup; > > > > > } > > > > > > } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
