amsul / amsul/pickadate.js

Feature request: Option to disable the scroll-blocking

未關閉
#1,173 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
7.6k
分支
981
PR 合併指標
30 天內沒有已合併 PR

描述

My site uses
```css
html { overflow-y: scroll; }
```
for making the vertical scroll bar always visible.

When pickadate popups the date-picker, extra padding appears on the left side of the vertical scroll bar.
(pickadate.js 3.6.4)

Sample: https://codepen.io/kzmi/pen/Mdzrvw

I can handle this issue like:
```javascript
$('.datepicker').pickadate({
onOpen: function() { $('html').css('overflow', 'hidden') },
onClose: function() { $('html').css('overflow', '') }
});
```
but this workaround seems not a good solution.
This workaround depends on the behavior of the pickadate's scroll-blocking.

If the scroll-blocking feature can be disabled, I can control the scroll-blocking with other way.

For example,
```javascript
$('.datepicker').pickadate({
...
noScrollBlocking: true, // example of the new option
...
onOpen: function() { myBlockScroll() },
onClose: function() { myUnblockScroll() }
});
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。