简体   繁体   English

Handsontable - 水平滚动条消失

[英]Handsontable - Horizontal Scroll Bar Disappearing

I have created four Handsontable instances split evenly accross four windows using a library called split.js. 我创建了四个Handsontable实例,使用名为split.js的库在四个窗口中均匀分割。

I have then enabled scroll bars on each window by setting the containers overflow to auto. 然后我通过将容器溢出设置为auto来启用每个窗口上的滚动条。

#equipment {
  overflow: auto;
}

This successfully displays the scroll bars in the vertical position under all GUI manipulation. 这会在所有GUI操作下成功显示垂直位置的滚动条。

However, the horizontal scroll bars are a bit more buggy. 但是,水平滚动条有点多了。 Specifically, on initial load of the windows the horizontal scroll bars are nowhere to be seen. 具体地说,在窗户的初始加载时,水平滚动条无处可见。 But on dragging the split.js gutters the scroll bar magically appears again! 但是在拖动split.js排水沟时,滚动条会再次神奇地出现! But then on clicking the handsontables within the containers the horizontal scroll bar disspears again (to the base of the handsontable). 但是当点击容器内的指针时,水平滚动条再次消失(到指针的底部)。 See image below. 见下图。 越野车水平滚动条

I have also created a fiddle that shows this issue. 我也创造了一个显示这个问题的小提琴。

https://jsfiddle.net/JoshAdams/4p8jLcnk/ https://jsfiddle.net/JoshAdams/4p8jLcnk/

So my question is how do I make the horizontal scroll bar always be displayed under all circumstances above? 所以我的问题是如何在所有情况下始终显示水平滚动条?

The overflow:auto was on an element that had a height higher than it's parent. overflow:auto在一个高度高于其父级的元素上。 The parent had overflow:hidden , so the horizontal scroll on the child element was hidden from view. 父有overflow:hidden ,因此子元素的水平滚动被隐藏在视图之外。 I wasn't sure if you wanted the on hover scroll bars, so I have added it to the CSS but commented it out. 我不确定你是否想要悬停滚动条,所以我已经将它添加到CSS但是注释掉了。 Here is an updated fiddle. 这是一个更新的小提琴。

https://jsfiddle.net/4p8jLcnk/9/ https://jsfiddle.net/4p8jLcnk/9/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM