Bug 1348052 - Change the scroll buttons in the datetime picker to move the view, not the list. r? draft
authorIan Moody <moz-ian@perix.co.uk>
Fri, 17 Mar 2017 21:47:46 +0000
changeset 500887 13f34f84034a63430d74b86e45c62eb3a23bfc54
parent 500857 23a4b7430dd7e83a2809bf3dc41471f154301eda
child 549739 2472e9f42a04a24374be04b9cc1446539d9a0222
push id49831
push usermoz-ian@perix.co.uk
push dateFri, 17 Mar 2017 21:54:02 +0000
bugs1348052
milestone55.0a1
Bug 1348052 - Change the scroll buttons in the datetime picker to move the view, not the list. r? MozReview-Commit-ID: EfgDEg6jY7F
toolkit/content/widgets/spinner.js
--- a/toolkit/content/widgets/spinner.js
+++ b/toolkit/content/widgets/spinner.js
@@ -295,21 +295,21 @@ function Spinner(props, context) {
             down: true,
             layerX: event.layerX,
             layerY: event.layerY
           };
           if (event.target == up) {
             // An "active" class is needed to simulate :active pseudo-class
             // because element is not focused.
             event.target.classList.add("active");
-            this._smoothScrollToIndex(index + 1);
+            this._smoothScrollToIndex(index - 1);
           }
           if (event.target == down) {
             event.target.classList.add("active");
-            this._smoothScrollToIndex(index - 1);
+            this._smoothScrollToIndex(index + 1);
           }
           if (event.target.parentNode == spinner) {
             // Listen to dragging events
             spinner.addEventListener("mousemove", this, { passive: true });
             spinner.addEventListener("mouseleave", this, { passive: true });
           }
           break;
         }