1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-14 12:15:48 +02:00

Fix broken notification scrolling in CEF 65 properly

This commit is contained in:
chylex 2018-05-07 02:43:40 +02:00
parent 3c03726634
commit 07de2f450c
3 changed files with 12 additions and 6 deletions
Core/Notification
Resources/Scripts

View File

@ -70,7 +70,7 @@ public string GenerateHtml(string bodyClasses){
build.Append(' ').Append(bodyClasses);
}
build.Append('\'').Append(isExample ? " td-example-notification" : "").Append("><div class='column' style='width:100%!important;height:auto!important;overflow:initial!important;'>");
build.Append('\'').Append(isExample ? " td-example-notification" : "").Append("><div class='column' style='width:100%!important;min-height:100vh!important;height:auto!important;overflow:initial!important;'>");
build.Append(html);
build.Append("</div></body>");
build.Append("</html>");

View File

@ -129,11 +129,10 @@
// Block: Setup a skip button.
//
if (!document.body.hasAttribute("td-example-notification")){
document.body.insertAdjacentHTML("afterbegin", `
document.body.children[0].insertAdjacentHTML("beforeend", `
<svg id="td-skip" width="10" height="17" viewBox="0 0 350 600">
<path fill="#888" d="M0,151.656l102.208-102.22l247.777,247.775L102.208,544.986L0,442.758l145.546-145.547">
</svg>
`);
</svg>`);
document.getElementById("td-skip").addEventListener("click", function(){
$TD.loadNextNotification();
@ -150,4 +149,9 @@
document.body.addEventListener("mouseleave", function(){
document.body.classList.remove("td-hover");
});
//
// Block: Force a reset of scroll position on every load.
//
history.scrollRestoration = "manual";
})($TD, $TDX);

View File

@ -2,7 +2,9 @@
/* General */
/***********/
body.td-notification {
html, body {
height: auto !important;
overflow-x: hidden !important;
overflow-y: auto !important;
}
@ -136,7 +138,7 @@ html[data-td-font='smallest'] .badge-verified:before {
#td-skip {
position: fixed;
left: 30px;
left: 29px;
bottom: 10px;
z-index: 1000;
cursor: pointer;