Horizontal Scrollbar also triggers the sidebar collapse behaviour

Hi SyncFusion team,

I was playing around with the sidebar control example, and I added these two things into the right hand side

display:flex

overflow:auto


The reason for doing that is to force the browser to display a horizontal scroll for the right hand side. You can refer to the picture below for more details.

I notice that if I move the scrollbar to the right and then "throw" it back to the left, the sidebar would also collapse without clicking the hamburger on the top left. Just wondering if there is a way to stop this behaviour, so the collapsing is only triggered if I click on the hamburger?



3 Replies 1 reply marked as answer

SM Shalini Maragathavel Syncfusion Team September 7, 2021 11:42 AM UTC

Hi Tuan, 

Greetings from Syncfusion support. 

We checked your query and suspect that you have performed scrolling using touch(since we are not facing the reported issue while using mouse for scrolling). We would like to let you know that, by default enableGesture is set as true, the Sidebar will be closed while touch actions are performed. You can prevent the Sidebar from closing while performing touch actions by setting enableGesture as false as demonstrated in the below code snippet. 

_layout.cshtml
 
<ejs-sidebar target=".main-content" enableGestures="false" enableDock="true" dockSize="44px" close="onClose"> 
        <e-content-template> 
            <div class="main-menu"> 
                <div>
                 . . .
 
                </div> 
            </div> 
        </e-content-template> 
    </ejs-sidebar> 
 
Please find the below sample for your reference. 
Shalini M. 


Marked as answer

TN Tuan Nam Dinh Tran September 8, 2021 04:32 AM UTC

Thanks a lot syncfusion team! 



KR Keerthana Rajendran Syncfusion Team September 8, 2021 05:49 AM UTC

Hi Tuan, 
 
Most welcome. We are glad to hear that the provided suggestions helped you. Please get back to us if you need any further assistance. 
    
Regards,    
Keerthana R.    


Loader.
Up arrow icon