scrolling problem solved
This commit is contained in:
1 parent
e7a44b7760
commit
2f4aa33cfe
3 files changed
+17
-14
No files matched your search
@@ -138,11 +138,11 @@ function newWebApp() {
|
||||
/*
|
||||
Add events to process button clicks.
|
||||
*/
|
||||
document.addEventListener("click", function (e) {
|
||||
userClicked(e)
|
||||
})
|
||||
document.addEventListener("click", onClick)
|
||||
|
||||
function userClicked(event) {
|
||||
document.addEventListener('mousewheel', onMouseWheel, false)
|
||||
|
||||
function onClick(event) {
|
||||
|
||||
if (event.target && event.target.nodeName === "BUTTON") {
|
||||
switch (event.target.action) {
|
||||
@@ -165,6 +165,11 @@ function newWebApp() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onMouseWheel(event) {
|
||||
let scrollDiv = document.getElementById("scroll-div")
|
||||
scrollDiv.scrollTop = scrollDiv.scrollTop + event.deltaY
|
||||
}
|
||||
}
|
||||
|
||||
function addWhoToFollowTable(profiles) {
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.body{
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.scroll-div {
|
||||
position:absolute;
|
||||
overflow-y: scroll;
|
||||
|
||||
@@ -28,20 +28,13 @@
|
||||
}
|
||||
|
||||
function onResize() {
|
||||
try {
|
||||
if (page === undefined) { return }
|
||||
if (page.eventHandler === undefined) { return }
|
||||
if (DISABLE_BROWSER_RESIZE_EVENT === true) { return }
|
||||
page.eventHandler.raiseEvent('Browser Resized')
|
||||
} catch (err) {
|
||||
console.log('Error Resizing. ' + err.stack)
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body id="body" onload="loadApp()" onresize="onResize()">
|
||||
<div class="scroll-div">
|
||||
<body id="body" onload="loadApp()" onresize="onResize()" class="body">
|
||||
<div id="scroll-div" class="scroll-div">
|
||||
<div class="content-div">
|
||||
<div class="post-div">
|
||||
POST 1
|
||||
|
||||
Reference in new issue
Block a user