Commits

Kirill Simonov committed 4e6fcbb

Fixed horizontal scrolling.

  • Participants
  • Parent commits 9b11f01

Comments (0)

Files changed (1)

File src/htsql_tweak/shell/static/shell.js

         for (var i = 0; i < colWidths.length-1; i ++) {
             tableWidth += colWidths[i];
         }
+        var overflow = 'auto';
         if (tableWidth < gridWidth) {
             var diff = gridWidth-tableWidth-1;
             colWidths[colWidths.length-1] += diff;
             tableWidth += diff;
+            if (diff+5 >= environ.scrollbarWidth)
+                overflow = 'hidden';
         }
         var $bodyGroup = $("<colgroup></colgroup>");
         var $headGroup = $("<colgroup></colgroup>");
                         top: headHeight,
                         width: 'auto',
                         'overflow-y': 'auto',
-                        'overflow-x': (tableWidth-environ.screenWidth
-                                        < gridWidth-environ.scrollbarWidth) ?
-                                        'hidden' : 'auto' });
+                        'overflow-x': overflow });
         setTimeout(reportTime, 0);
     }