diff options
Diffstat (limited to 'compatibility-client')
-rw-r--r-- | compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java | 49 |
1 files changed, 33 insertions, 16 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java index a6fbfb4e76..82d599b31d 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java @@ -7324,31 +7324,34 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, eventCell.set(cell, getSectionFromContainer(container)); // Editor can steal focus from Grid and is still handled - if (isEditorEnabled() && handleEditorEvent(event, container)) { + if (handleEditorEvent(event, container)) { return; } // Fire GridKeyEvents and GridClickEvents. Pass the event to escalator. - super.onBrowserEvent(event); + if (handleSuperEvent(event, container)) { + return; + } - if (!isElementInChildWidget(e)) { + if (handleChildWidgetEvent(event, container)) { + return; + } - if (handleHeaderCellDragStartEvent(event, container)) { - return; - } + if (handleHeaderCellDragStartEvent(event, container)) { + return; + } - // Sorting through header Click / KeyUp - if (handleHeaderDefaultRowEvent(event, container)) { - return; - } + // Sorting through header Click / KeyUp + if (handleHeaderDefaultRowEvent(event, container)) { + return; + } - if (handleRendererEvent(event, container)) { - return; - } + if (handleRendererEvent(event, container)) { + return; + } - if (handleCellFocusEvent(event, container)) { - return; - } + if (handleCellFocusEvent(event, container)) { + return; } } @@ -7402,6 +7405,10 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, } private boolean handleEditorEvent(Event event, RowContainer container) { + if (!isEditorEnabled()) { + return false; + } + Widget w; if (editor.focusedColumnIndex < 0) { w = null; @@ -7415,6 +7422,16 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, return getEditor().getEventHandler().handleEvent(editorEvent); } + private boolean handleSuperEvent(Event event, RowContainer container) { + super.onBrowserEvent(event); + return false; + } + + private boolean handleChildWidgetEvent(Event event, + RowContainer container) { + return isElementInChildWidget(Element.as(event.getEventTarget())); + } + private boolean handleRendererEvent(Event event, RowContainer container) { if (container == escalator.getBody()) { |