summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-06-05 19:15:49 +0300
committerArtur Signell <artur@vaadin.com>2013-06-05 19:15:54 +0300
commit1f144228f657b5014bc8fd3b08cf8f33950966f6 (patch)
tree13ab5e89e98194030a0912c91e5dfce951696cee /server
parentfad7bf7a791db16349467ccbc508d0e472330fa0 (diff)
parent14ebd0d9c8bdfa9940786492876172d1891f593f (diff)
downloadvaadin-framework-1f144228f657b5014bc8fd3b08cf8f33950966f6.tar.gz
vaadin-framework-1f144228f657b5014bc8fd3b08cf8f33950966f6.zip
Merge changes from origin/7.0
892b8ba Do not submit TextArea value on enter in IE (#11982) bd3f975 Properly disable combobox when parent is disabled (#10734) 1b85e59 Added missing import (#11982) 3c8a3bf Merge of properly focus clicked input element in Webkit (#11854, #11297) d647d7a Ensure VBrowserFrame content is unloaded in IE (#11683) 08ba394 Disable drag&drop when source or target component is disabled, re-implementation of 6.8 fix for #11801 b01427a Change field types from LinkedHashSet back to HashSet to retain binary compatibility (#11432) 14ebd0d Fixed newlines Change-Id: Icea535d8d5130e013327dd76a194e3910f533332
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/event/ActionManager.java13
-rw-r--r--server/src/com/vaadin/server/DragAndDropService.java19
2 files changed, 28 insertions, 4 deletions
diff --git a/server/src/com/vaadin/event/ActionManager.java b/server/src/com/vaadin/event/ActionManager.java
index ce3e27d539..8d7a64b364 100644
--- a/server/src/com/vaadin/event/ActionManager.java
+++ b/server/src/com/vaadin/event/ActionManager.java
@@ -15,6 +15,7 @@
*/
package com.vaadin.event;
+import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Map;
@@ -43,11 +44,15 @@ public class ActionManager implements Action.Container, Action.Handler,
private static final long serialVersionUID = 1641868163608066491L;
- /** List of action handlers */
- protected LinkedHashSet<Action> ownActions = null;
+ /**
+ * List of action handlers. Guaranteed to keep the original insertion order.
+ */
+ protected HashSet<Action> ownActions = null;
- /** List of action handlers */
- protected LinkedHashSet<Handler> actionHandlers = null;
+ /**
+ * List of action handlers. Guaranteed to keep the original insertion order.
+ */
+ protected HashSet<Handler> actionHandlers = null;
/** Action mapper */
protected KeyMapper<Action> actionMapper = null;
diff --git a/server/src/com/vaadin/server/DragAndDropService.java b/server/src/com/vaadin/server/DragAndDropService.java
index cc571853fe..df2361e887 100644
--- a/server/src/com/vaadin/server/DragAndDropService.java
+++ b/server/src/com/vaadin/server/DragAndDropService.java
@@ -64,6 +64,16 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
public void changeVariables(Object source, Map<String, Object> variables) {
Object owner = variables.get("dhowner");
+ final Component sourceComponent = (Component) variables
+ .get("component");
+ if (sourceComponent != null && !sourceComponent.isEnabled()) {
+ // source component not supposed to be enabled
+ getLogger().warning(
+ "Client dropped from " + sourceComponent
+ + " even though it's disabled");
+ return;
+ }
+
// Validate drop handler owner
if (!(owner instanceof DropTarget)) {
getLogger()
@@ -74,6 +84,15 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
// owner cannot be null here
DropTarget dropTarget = (DropTarget) owner;
+
+ if (!dropTarget.isEnabled()) {
+ getLogger()
+ .warning(
+ "Client dropped on " + owner
+ + " even though it's disabled");
+ return;
+ }
+
lastVisitId = (Integer) variables.get("visitId");
// request may be dropRequest or request during drag operation (commonly