My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 4584: Auto-hide code in PopupPanel can fail if no history iframe is present
11 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Closed:  Feb 2010

Sign in to add a comment
Reported by, Feb 4, 2010
(If this is your first time submitting an issue report to the GWT Issue
Tracker, please see the sample issue report linked below for an example of
a well reported issue)
Sample issue report:

Found in GWT Release (e.g. 1.5.3, 1.6 RC): 2.0.1

Encountered on OS / Browser (e.g. WinXP, IE6-7, FF3): Vista x64, IE7

Detailed description (please be as specific as possible):

  Try to use when module has no "__gwt_historyFrame" frame.
  Same code works in GWT 2.0.0.

00:02:53,893 [ERROR] Uncaught exception escaped
java.lang.NullPointerException: null 	at 
at 	at 	at 	at
com.mycompany.project.client.ImageViewer$1.onClick( 	at 	at 	at$HandlerRegistry.fireEvent(
	at 	at 	at 	at 	at 	at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 	at
	at java.lang.reflect.Method.invoke( 	at 	at 	at
	at 	at
	at 	at 	at
sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source) 	at
	at java.lang.reflect.Method.invoke( 	at 	at 	at

Shortest code snippet which demonstrates issue (please indicate where
actual result differs from expected result):

Workaround if you have one:

Links to relevant GWT Developer Forum posts:

Feb 5, 2010
Project Member #1
This report could be a little clearer, but in a nutshell the PopupPanel code assumes 
that History will always be supported. This is not strictly true, because in the 
absence of a history iframe, IE cannot support history events, and will generate this 
error if you attempt to use them (there's a warning about it in hosted mode when 
you attempt to initialize the history system).

We need the code in PopupPanel to work whether or not history is enabled. There's 
currently no way to ask this question (History.isEnabled() or something like that), so 
we'll have to add this.

gwtc discussion:
Summary: Auto-hide code in PopupPanel can fail if no history iframe is present
Status: Accepted
Labels: Category-UI Priority-High Type-Defect
Feb 5, 2010
#2 david.nouls
I hope we will get a new build soon since this is a regression issue that might 
break many applications.
Feb 5, 2010
I'll work on this immediately.

Basically, we should only add the history handler if autoHideOnHistoryEvents is 
enabled, so we avoid the static History initializer unless users opt in.  If they opt 
in without having history enabled, then the warning makes sense.

This also means that creating a PopupPanel with autoHide enabled should NOT set 
autoHideOnHistoryEvents to true automatically.
Feb 5, 2010
#4 david.nouls
Wouldn't it be better to check if History is enabled without forcing the History 
support to be intialized ? Or alternatively it could just fail silently when the 
IFrame is not there (a warning could be useful).

IMHO: It makes a lot of sense that a auto hide popup will hide when the history 
changes without the developer having to enable an extra flag.
Feb 5, 2010
#5 itruett
From my perspective this looks like more of a problem with the IE history 
implementation than the PopupPanel's implementation. As I understand it, everywhere but 
IE the PopupPanel will add a pointless-but-harmless history handler; in IE that 
pointless handler causes an error. Wouldn't the "right" thing to do be to make the IE 
implementation more accommodating of history handlers added when history is disabled? 
Feb 5, 2010

The patch fixes IE history, not just PopupPanel.  We already did null checks on the 
impl instance in History, but we didn't do a null check in every method.
Status: ReviewPending
Feb 10, 2010
committed as r7544
Status: FixedNotReleased
Feb 10, 2010
(No comment was entered for this change.)
Labels: Milestone-2_0_2
Feb 15, 2010
#9 david.nouls
This issue is NOT fixed, this is what I get when using GWT 2.0.2
2010/02/15 14:59:20 SEVERE Unknown:Uncaught Exception

Feb 15, 2010
That was a big oversite on my part.  I added unit tests for disabling History, but I 
didn't add tests for disabling History with a PopupPanel.  I'm sure I tested it 
manually, but apparently not well enough :( 
Labels: -Priority-High Priority-Critical
Feb 15, 2010
(No comment was entered for this change.)
Status: Started
Feb 16, 2010
fix committed as r7583
Status: FixedNotReleased
Feb 17, 2010
Although this issue is said to be fixed in GWT 2.0.2 (which is the milestone for this
filed issue), it is not included the release jars.
Feb 18, 2010
#14 david.nouls
No, it is FixedNotReleased... I am waiting for this one as well (2.0.3 ?) since it 
breaks all my apps. As a workaround I temporarily added the history IFrames, but I 
have not use for them.
Feb 18, 2010
#16 david.nouls
See comment 9. The case was re-opened because the fix was only partially working.
Feb 18, 2010
We just uploaded a GWT 2.0.3 release candidate that fixes this issue, for real this 
time.  Please try it out and verify that the issue is indeed fixed with this version 
before we officially release it.

This is a slightly out of band release candidate because we haven't marked the distributable as an RC.  Instead, once we receive positive feedback, we will simply 
mark it as the official release in the downloads section.

Thanks for your help,
- John
Feb 19, 2010
#18 david.nouls
This one is perfect! It's a wrap!
Feb 19, 2010
(No comment was entered for this change.)
Labels: -Milestone-2_0_2 Milestone-2_0_3
Feb 24, 2010
GWT 2.0.3 has been released.
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting