Scrollbar continues to scroll in jstree

I have a dataset displayed as a tree using jstree plugin and jquery.

Data is perfectly displayed in a tree structure. When expanding the last node in the tree, a scroll bar appears on the right side of the div block.

Problem: However, if I move inside the tree with the mouse on the scroll bar, the scroll bar continues to scroll down and does not rise.

I am at the end of what could be the reason. I am using Mozilla Firefox browser.

Please, help.

Sample code below:

CSS

.myScrollableBlock {
  display: block;
  height: 170px;
  overflow: auto;
}

.jsp:

<div id="myTreeDiv" class="myScrollableBlock">
</div>

.js

$('div#myTreeDiv').jstree({
// jsTree plugins
    ...
    ...
    ...
});
+4
source share
1 answer
  • How to solve

div, div, jstree, class= "myScrollableBlock" div. :

<div class="myScrollableBlock">
    <div id="myTreeDiv"></div>
</div>

jstree, jquery

$('div#myTreeDiv').jstree({...});

css, (class="myScrollableBlock" ).

:

<div style="padding: 20px 20px; overflow: auto; height:170px;">
    <div id="myTreeDiv"></div>
</div>

CSS JS?

HTML JS DOM CSS . , . enter image description here : https://www.sitepoint.com/optimizing-critical-rendering-path/

+10

All Articles