Created
December 29, 2011 12:41
-
-
Save ogavrisevs/1533904 to your computer and use it in GitHub Desktop.
GWT bug, ClickHandler not firing when CSS "position: absolute" added
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> | |
<application></application> | |
<version>1</version> | |
</appengine-web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN" | |
"http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd"> | |
<module rename-to="MySampleApplication"> | |
<inherits name='com.google.gwt.user.User'/> | |
<entry-point class='com.mySampleApplication.client.MySampleApplication'/> | |
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Wrapper HTML for App</title> | |
<script type="text/javascript" language="javascript" | |
src="MySampleApplication/MySampleApplication.nocache.js"></script> | |
</head> | |
<body> | |
<div id="slot1" style="position: absolute; padding-top: 50px; padding-left: 150px;" ></div> | |
<div id="slot2" style="position: absolute; padding-top: 100px; padding-left: 150px;" ></div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onModuleLoad() { | |
final Button button = new Button("Click me"); | |
button.addClickHandler(new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
Window.alert("ahtung"); | |
} | |
}); | |
RootPanel.get("slot1").add(button); | |
final Button button2 = new Button("Click me2"); | |
button2.addClickHandler(new ClickHandler() { | |
public void onClick(ClickEvent event) { | |
Window.alert("ahtung2"); | |
} | |
}); | |
RootPanel.get("slot2").add(button2); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | |
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | |
version="2.5"> | |
</web-app> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment