File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -713,15 +713,15 @@ export default class Scrollbar extends React.Component
713713 if ( ( permanentScrollbars || permanentScrollbarY ) ) {
714714 trackVerticalStyles . display = null ;
715715
716- if ( noScroll || ! scrollY ) {
716+ if ( noScroll || noScrollY ) {
717717 thumbVerticalStyles . display = "none" ;
718718 }
719719 }
720720
721721 if ( ( permanentScrollbars || permanentScrollbarX ) ) {
722722 trackHorizontalStyles . display = null ;
723723
724- if ( noScroll || ! scrollX ) {
724+ if ( noScroll || noScrollX ) {
725725 thumbHorizontalStyles . display = "none" ;
726726 }
727727 }
Original file line number Diff line number Diff line change @@ -343,6 +343,23 @@ export default function performTests() {
343343 } ) ;
344344 } ) ;
345345
346+ describe ( "when always showing scrollbars" , ( ) => {
347+ it ( "should render thumb when content taller than viewport" , ( done ) => {
348+ render ( < Scrollbar style = { { width : 100 , height : 100 } } permanentScrollbarY >
349+ < div style = { { width : 100 , height : 200 } } />
350+ </ Scrollbar > ,
351+ node ,
352+ function ( ) {
353+ setTimeout ( ( ) => {
354+ expect ( this . trackVertical . style . display ) . not . toBe ( "none" ) ;
355+ expect ( this . thumbVertical . style . display ) . not . toBe ( "none" ) ;
356+ done ( ) ;
357+ } , 100 ) ;
358+ }
359+ ) ;
360+ } ) ;
361+ } )
362+
346363 describe ( "only vertical scroll should be blocked" , ( ) => {
347364 it ( "if noScrollY={ true } is passed" , ( done ) => {
348365 render ( < Scrollbar style = { { width : 100 , height : 100 } } noScrollY = { true } >
You can’t perform that action at this time.
0 commit comments