Skip to content

Commit 922c0b1

Browse files
authored
Merge pull request #1718 from adumesny/master
scrollbar fix
2 parents 43fded5 + fd3f46f commit 922c0b1

25 files changed

+176
-125
lines changed

doc/CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Change log
55
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
77

8+
- [4.1.0-dev](#410-dev)
89
- [4.1.0 (2021-4-7)](#410-2021-4-7)
910
- [4.0.3 (2021-3-28)](#403-2021-3-28)
1011
- [4.0.2 (2021-3-27)](#402-2021-3-27)
@@ -52,6 +53,10 @@ Change log
5253
- [v0.1.0 (2014-11-18)](#v010-2014-11-18)
5354

5455
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
56+
## 4.1.0-dev
57+
58+
- fix [#1704](https://github.com/gridstack/gridstack.js/issues/1704) scrollbar fix broken in 4.x
59+
5560
## 4.1.0 (2021-4-7)
5661

5762
- fix [#219](https://github.com/gridstack/gridstack.js/issues/219) **fixing another 6 years old request** we now automatically insert extra rows

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gridstack",
3-
"version": "4.1.0",
3+
"version": "4.1.0-dev",
44
"description": "TypeScript/JS lib for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Vue, Ember, knockout...)",
55
"main": "./dist/gridstack.js",
66
"types": "./dist/gridstack.d.ts",
@@ -87,6 +87,6 @@
8787
"ts-loader": "^8.0.7",
8888
"typescript": "3.6.5",
8989
"webpack": "^5.3.2",
90-
"webpack-cli": "^4.1.0"
90+
"webpack-cli": "^4.1.0-dev"
9191
}
9292
}

spec/e2e/html/1704_scroll_bar.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" href="../../../demo/demo.css"/>
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css"></link>
9+
<script src="../../../dist/gridstack-h5.js"></script>
10+
<style>
11+
#trash {
12+
background: rgba(255, 0, 0, 0.4);
13+
}
14+
.two {
15+
background: lavender;
16+
}
17+
</style>
18+
19+
</head>
20+
<body>
21+
<div class="container-fluid">
22+
<div class="row">
23+
<div class="col-md-2 d-none d-md-block" style="position: relative;">
24+
<div style="position: sticky; top: 0;">
25+
<div id="trash" style="padding: 5px; margin-bottom: 15px;" class="text-center">remove</div>
26+
<div class="newWidget grid-stack-item" gs-min-w="3">
27+
<div class="grid-stack-item-content" style="padding: 5px;">add</div>
28+
</div>
29+
</div>
30+
</div>
31+
<div class="col-sm-12 col-md-10">
32+
<div class="grid-stack"></div>
33+
<div class="grid-stack two"></div>
34+
</div>
35+
</div>
36+
<script type="text/javascript">
37+
let grids = GridStack.initAll({
38+
acceptWidgets: true,
39+
dragIn: ".newWidget", // class that can be dragged from outside
40+
dragOut: false,
41+
dragInOptions: {
42+
revert: "invalid",
43+
scroll: false,
44+
appendTo: "body",
45+
helper: "clone"
46+
},
47+
removable: "#trash", // drag-out delete class
48+
removeTimeout: 100,
49+
float: true,
50+
row: 3,
51+
});
52+
// let items = [{x: 0, y: 0, content: "0"}];
53+
// grids.forEach(grid => grid.load(items));
54+
</script>
55+
</body>
56+
</html>

src/gridstack-dd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gridstack-dd.ts 4.1.0
2+
* gridstack-dd.ts 4.1.0-dev
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

@@ -161,7 +161,7 @@ GridStack.prototype._setupAcceptWidget = function(): GridStack {
161161

162162
// get grid screen coordinates and cell dimensions
163163
let box = this.el.getBoundingClientRect();
164-
gridPos = {top: box.top + document.documentElement.scrollTop, left: box.left};
164+
gridPos = {top: box.top, left: box.left};
165165
cellWidth = this.cellWidth();
166166
cellHeight = this.getCellHeight(true);
167167

src/gridstack-ddi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gridstack-ddi.ts 4.1.0
2+
* gridstack-ddi.ts 4.1.0-dev
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/gridstack-engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gridstack-engine.ts 4.1.0
2+
* gridstack-engine.ts 4.1.0-dev
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/gridstack-h5.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* index-h5.ts 4.1.0 - everything you need for a Grid that uses HTML5 native drag&drop
2+
* index-h5.ts 4.1.0-dev - everything you need for a Grid that uses HTML5 native drag&drop
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/gridstack-jq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* index-jq.ts 4.1.0 - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature)
2+
* index-jq.ts 4.1.0-dev - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature)
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/gridstack-poly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gridstack-poly.ts 4.1.0 - used for older browser support (not currently supported in v2+)
2+
* gridstack-poly.ts 4.1.0-dev - used for older browser support (not currently supported in v2+)
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

src/gridstack-static.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* index-static.ts 4.1.0 - much smaller, everything you need for a static Grid (non draggable, API driven)
2+
* index-static.ts 4.1.0-dev - much smaller, everything you need for a static Grid (non draggable, API driven)
33
* Copyright (c) 2021 Alain Dumesny - see GridStack root license
44
*/
55

0 commit comments

Comments
 (0)