diff --git a/Core/Notification/TweetNotification.cs b/Core/Notification/TweetNotification.cs index f226d92f..37b3ec91 100644 --- a/Core/Notification/TweetNotification.cs +++ b/Core/Notification/TweetNotification.cs @@ -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>"); diff --git a/Resources/Scripts/notification.js b/Resources/Scripts/notification.js index b4d89d23..91500bf7 100644 --- a/Resources/Scripts/notification.js +++ b/Resources/Scripts/notification.js @@ -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); diff --git a/Resources/Scripts/styles/notification.css b/Resources/Scripts/styles/notification.css index 1826730d..065a86e2 100644 --- a/Resources/Scripts/styles/notification.css +++ b/Resources/Scripts/styles/notification.css @@ -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;