summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-07-09 12:32:17 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-07-09 12:32:17 +0000
commit0676a3a814529deca31a40080982509c4238519c (patch)
treecec27c3e8a8b4cdc329e39ef4254c03e1e16c1fe
parentdd5289d3b5b50b526728798d693fa115f13b18f3 (diff)
downloadvaadin-framework-0676a3a814529deca31a40080982509c4238519c.tar.gz
vaadin-framework-0676a3a814529deca31a40080982509c4238519c.zip
Revert #8193 patch because of regressions
svn changeset:24000/svn branch:6.8
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VView.java27
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VWindow.java3
2 files changed, 5 insertions, 25 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java
index 3f0347c306..6fdacc9607 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VView.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java
@@ -18,8 +18,6 @@ import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.event.dom.client.DomEvent.Type;
-import com.google.gwt.event.dom.client.KeyDownEvent;
-import com.google.gwt.event.dom.client.KeyDownHandler;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.event.shared.EventHandler;
@@ -138,31 +136,12 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
// should not be in the document focus flow
getElement().setTabIndex(-1);
TouchScrollDelegate.enableTouchScrolling(this, getElement());
-
- // Handle shortcut actions originated from the main window. Subwindow
- // shortcut actions are handled by the subwindows themselves.
- RootPanel.get().addDomHandler(new KeyDownHandler() {
- public void onKeyDown(KeyDownEvent event) {
-
- Event nativeEvent = event.getNativeEvent().cast();
- com.google.gwt.user.client.Element target = nativeEvent
- .getEventTarget().cast();
- // Ensure the event originates from our application even in case
- // we're embedded.
- if (actionHandler != null
- && (!isEmbedded() || (Util.getPaintableForElement(
- connection, getParent(), target) != null))) {
- actionHandler.handleKeyboardEvent(nativeEvent);
- }
- }
- }, KeyDownEvent.getType());
}
/**
* Start to periodically monitor for parent element resizes if embedded
* application (e.g. portlet).
*/
- @Override
protected void onLoad() {
super.onLoad();
if (isMonitoringParentSize()) {
@@ -590,7 +569,10 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);
int type = DOM.eventGetType(event);
- if (scrollable && type == Event.ONSCROLL) {
+ if (type == Event.ONKEYDOWN && actionHandler != null) {
+ actionHandler.handleKeyboardEvent(event);
+ return;
+ } else if (scrollable && type == Event.ONSCROLL) {
updateScrollPosition();
}
}
@@ -952,4 +934,5 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
public void focus() {
getElement().focus();
}
+
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
index 9b124ae466..2384ee7ddd 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
@@ -1377,9 +1377,6 @@ public class VWindow extends VOverlay implements Container,
if (shortcutHandler != null) {
shortcutHandler
.handleKeyboardEvent(Event.as(event.getNativeEvent()));
- // Don't let the event propagate to the RootPanel where VView
- // listens to shortcut events of the main window.
- event.stopPropagation();
return;
}
}