diff --git a/indra/llui/llxyvector.cpp b/indra/llui/llxyvector.cpp
index 48f38b8a92bd6e85b4ba73098e11cf45ffb0f617..9d5823e368c94d30990da591e453a690c7ab115b 100644
--- a/indra/llui/llxyvector.cpp
+++ b/indra/llui/llxyvector.cpp
@@ -289,7 +289,14 @@ BOOL LLXYVector::handleMouseUp(S32 x, S32 y, MASK mask)
         make_ui_sound("UISndClickRelease");
     }
 
-    return TRUE;
+    if (mTouchArea->getRect().pointInRect(x, y))
+    {
+        return TRUE;
+    }
+    else
+    {
+        return LLUICtrl::handleMouseUp(x, y, mask);
+    }
 }
 
 BOOL LLXYVector::handleMouseDown(S32 x, S32 y, MASK mask)
@@ -299,8 +306,12 @@ BOOL LLXYVector::handleMouseDown(S32 x, S32 y, MASK mask)
     {
         gFocusMgr.setMouseCapture(this);
         make_ui_sound("UISndClick");
-    }
 
-    return TRUE;
+        return TRUE;
+    }
+    else
+    {
+        return LLUICtrl::handleMouseDown(x, y, mask);
+    }
 }
 
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index 0f2c572ccf88870568f8c6f5deaa910a68221e65..fd5fb67837b55335e3373286e3a39d8d423c06ea 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -89,6 +89,9 @@ class LLFloaterEditExtDayCycle : public LLFloater
 
     void                        setEditDayCycle(const LLSettingsDay::ptr_t &pday);
     void                        setEditDefaultDayCycle();
+    LLUUID                      getEditingAssetId() { return mEditDay ? mEditDay->getAssetId() : LLUUID::null; }
+    LLUUID                      getEditingInventoryId() { return mInventoryId; }
+
 
     BOOL			            handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) override;
 
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 1c1267735585a1aff44d99ba5fff1e56888de4f5..ee66c5c15b5e6e73a0292b50a28d941af83e268e 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -116,6 +116,7 @@ const std::string alt_labels[] = {
 LLPanelEnvironmentInfo::LLPanelEnvironmentInfo(): 
     mCurrentEnvironment(),
     mDirtyFlag(0),
+    mEditorLastParcelId(INVALID_PARCEL_ID),
     mCrossRegion(false),
     mNoSelection(false),
     mNoEnvironment(false),
@@ -325,11 +326,15 @@ void LLPanelEnvironmentInfo::updateEditFloater(const LLEnvironment::EnvironmentI
         else
             dayeditor->closeFloater();
     }
-    else
+    else if (dayeditor->getEditingAssetId() != nextenv->mDayCycle->getAssetId()
+            || mEditorLastParcelId != nextenv->mParcelId
+            || mEditorLastRegionId != nextenv->mRegionId)
     {
         // Ignore dirty
         // If parcel selection changed whatever we do except saving to inventory with
         // old settings will be invalid.
+        mEditorLastParcelId = nextenv->mParcelId;
+        mEditorLastRegionId = nextenv->mRegionId;
         dayeditor->setEditDayCycle(nextenv->mDayCycle);
     }
 }
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index 01b9b9c5622f804516fd7bb9e55a307c5600ac8c..3ed631db4193057cb76c98a14e5390d91f317d76 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -171,6 +171,8 @@ class LLPanelEnvironmentInfo : public LLPanel
     LLHandle<LLFloater>             mSettingsFloater;
     LLHandle<LLFloater>             mEditFloater;
     S32                             mDirtyFlag;
+    S32                             mEditorLastParcelId;
+    LLUUID                          mEditorLastRegionId;
     bool                            mCrossRegion;
     bool                            mNoSelection;
     bool                            mNoEnvironment;