Fixed issue 17064: Now toolbar scroll mouse down doesn't move the focus to the top level
authorDavid Baz Fayos <david.baz@openbravo.com>
Wed, 11 May 2011 16:37:14 +0200
changeset 12098 2513041b7794
parent 12097 797e4542bfcb
child 12099 0c6d66b44e56
Fixed issue 17064: Now toolbar scroll mouse down doesn't move the focus to the top level
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-eventhandler.js
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-window.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-eventhandler.js	Wed May 11 16:18:29 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-eventhandler.js	Wed May 11 16:37:14 2011 +0200
@@ -59,7 +59,9 @@
               return true;
             }
           }
-          if (!canvas.parentElement && canvas.grid) {
+          if (canvas.mouseDownCancelParentPropagation) { // Added to be able to scroll the toolbar without focusing top level view
+            canvas = null;
+          } else if (!canvas.parentElement && canvas.grid) {
             canvas = canvas.grid;
           } else {
             canvas = canvas.parentElement;
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-window.js	Wed May 11 16:18:29 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-window.js	Wed May 11 16:37:14 2011 +0200
@@ -56,6 +56,7 @@
     this.views = [];
     
     this.toolBarLayout = isc.HLayout.create({
+      mouseDownCancelParentPropagation: true,
       width: '100%',
       height: 1, // is set by its content
       overflow: 'visible'