Bug 467069 - consolidate decorated-month-view-binding and decorated-multiday-view-binding;r=philipp
authorBerend Cornelius [:berend] <berend.cornelius@sun.com>
Sat, 06 Dec 2008 11:55:28 +0100
changeset 1343 f1771043d32b43f0dedcbae4b9b7826a0ff9786d
parent 1342 1c1490c69a672382349440fba2470c6b55c4edd0
child 1344 66a806479c6c144374f5a08789669e7f6a6c018f
push idunknown
push userunknown
push dateunknown
reviewersphilipp
bugs467069
Bug 467069 - consolidate decorated-month-view-binding and decorated-multiday-view-binding;r=philipp
calendar/base/content/calendar-month-view.xml
--- a/calendar/base/content/calendar-month-view.xml
+++ b/calendar/base/content/calendar-month-view.xml
@@ -411,27 +411,20 @@
       <handler event="dblclick"><![CDATA[
         event.stopPropagation();
         this.calendarView.controller.createNewEvent();
       ]]></handler>
       <handler event="click" button="0"><![CDATA[
         this.calendarView.setSelectedItems(0, []);
       ]]></handler>
       <handler event="DOMMouseScroll"><![CDATA[
-        if (event.originalTarget.getAttribute("anonid") != "day-label") {
-          // Finding out if the box is overflowing is tricky, but fortunately
-          // the height of the boxes is equal.
-          var childHeight = (this.dayitems.firstChild ?
-                             this.dayitems.firstChild.boxObject.height *
-                             this.dayitems.childNodes.length : 0);
-          if (this.dayitems.boxObject.height < childHeight) {
-            // The box is overflowing. Stop propagation and let the default
-            // event handler take care of scrolling
-            event.stopPropagation();
-          }
+        if (getParentNodeOrThisByAttribute(event.originalTarget, "anonid", "day-label") == null) {
+            if (this.dayitems.scrollHeight > this.dayitems.clientHeight) {
+                event.stopPropagation();
+            }
         }
       ]]></handler>
     </handlers>
   </binding>
 
   <binding id="calendar-month-view-column-header">
     <content>
       <xul:hbox class="calendar-month-view-column-header-container" flex="1" pack="center">