Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 8976)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 8977)
@@ -54,4 +54,5 @@
 import org.openstreetmap.josm.tools.Pair;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -810,10 +811,21 @@
 
     /**
-     * Present warning in case of large and possibly unwanted movements and undo
-     * unwanted movements.
+     * Present warning in the following cases and undo unwanted movements: <ul>
+     * <li>large and possibly unwanted movements</li>
+     * <li>movement of node with attached ways that are hidden by filters</li>
+     * </ul>
      *
      * @param e the mouse event causing the action (mouse released)
      */
     private void confirmOrUndoMovement(MouseEvent e) {
+        if (movesHiddenWay()) {
+            final ExtendedDialog ed = new ConfirmMoveDialog();
+            ed.setContent(tr("Are you sure that you want to move elements with attached ways that are hidden by filters?"));
+            ed.toggleEnable("movedHiddenElements");
+            ed.showDialog();
+            if (ed.getValue() != 1) {
+                Main.main.undoRedo.undo();
+            }
+        }
         int max = Main.pref.getInteger("warn.move.maxelements", 20), limit = max;
         for (OsmPrimitive osm : getCurrentDataSet().getSelected()) {
@@ -826,9 +838,5 @@
         }
         if (limit < 0) {
-            ExtendedDialog ed = new ExtendedDialog(
-                    Main.parent,
-                    tr("Move elements"),
-                    new String[]{tr("Move them"), tr("Undo move")});
-            ed.setButtonIcons(new String[]{"reorder", "cancel"});
+            final ExtendedDialog ed = new ConfirmMoveDialog();
             ed.setContent(
                     /* for correct i18n of plural forms - see #9110 */
@@ -836,5 +844,4 @@
                         "You moved more than {0} elements. " + "Moving a large number of elements is often an error.\n" + "Really move them?",
                         max, max));
-            ed.setCancelButton(2);
             ed.toggleEnable("movedManyElements");
             ed.showDialog();
@@ -849,4 +856,30 @@
         }
         getCurrentDataSet().fireSelectionChanged();
+    }
+
+    static class ConfirmMoveDialog extends ExtendedDialog {
+        public ConfirmMoveDialog() {
+            super(Main.parent,
+                    tr("Move elements"),
+                    new String[]{tr("Move them"), tr("Undo move")});
+            setButtonIcons(new String[]{"reorder", "cancel"});
+            setCancelButton(2);
+
+        }
+    }
+
+    private boolean movesHiddenWay() {
+        final Collection<OsmPrimitive> elementsToTest = new HashSet<>(getCurrentDataSet().getSelected());
+        for (Way osm : Utils.filteredCollection(getCurrentDataSet().getSelected(), Way.class)) {
+            elementsToTest.addAll(osm.getNodes());
+        }
+        for (OsmPrimitive node : Utils.filteredCollection(elementsToTest, Node.class)) {
+            for (Way ref : Utils.filteredCollection(node.getReferrers(), Way.class)) {
+                if (ref.isDisabledAndHidden()) {
+                    return true;
+                }
+            }
+        }
+        return false;
     }
 
