[Rt-commit] rt branch, 5.0/fix-keyboard-shortcuts, created. rt-5.0.0alpha1-27-g0e96af6f8

Blaine Motsinger blaine at bestpractical.com
Fri Mar 13 20:09:34 EDT 2020


The branch, 5.0/fix-keyboard-shortcuts has been created
        at  0e96af6f8b0a817133e6780f9db9c4233ede2d52 (commit)

- Log -----------------------------------------------------------------
commit 0e96af6f8b0a817133e6780f9db9c4233ede2d52
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Fri Mar 13 19:04:34 2020 -0500

    Fix keyboard shortcut highlight and scroll
    
    The keyboard shortcut highlight border-left syntax was missing the
    "solid" definition so was not being displayed when selected.
    
    Additionally, the function to scroll the selected element into view
    was breaking on the last row of a ticket collection, since
    obj.next().height() was returning NaN.

diff --git a/share/static/css/elevator-light/keyboard-shortcuts.css b/share/static/css/elevator-light/keyboard-shortcuts.css
index aa16e55fa..2b8fee2c5 100644
--- a/share/static/css/elevator-light/keyboard-shortcuts.css
+++ b/share/static/css/elevator-light/keyboard-shortcuts.css
@@ -25,6 +25,5 @@
 }
 
 .ticket-list .selected-row tr {
-    border-left-color: #3858a3;
-    border-left-width: 3px;
+    border-left: 3px solid #3858a3;
 }
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 6ee838aa6..fdf6a1941 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -935,7 +935,7 @@ function scrollToJQueryObject(obj) {
     var viewportHeight = jQuery(window).height(),
         currentScrollPosition = jQuery(window).scrollTop(),
         currentItemPosition = obj.offset().top,
-        currentItemSize = obj.height() + obj.next().height();
+        currentItemSize = obj.height() + ( obj.next().height() ? obj.next().height() : 0 );
 
     if (currentScrollPosition + viewportHeight < currentItemPosition + currentItemSize) {
         jQuery('html, body').scrollTop(currentItemPosition - viewportHeight + currentItemSize);

-----------------------------------------------------------------------


More information about the rt-commit mailing list