diff --git a/DNN Platform/Website/Default.aspx.cs b/DNN Platform/Website/Default.aspx.cs index dd6f27fdef8..f40687f4219 100644 --- a/DNN Platform/Website/Default.aspx.cs +++ b/DNN Platform/Website/Default.aspx.cs @@ -228,7 +228,7 @@ protected override void OnInit(EventArgs e) var ctlSkin = this.GetSkin(); this.clientResourceController.RegisterPathNameAlias("SkinPath", this.CurrentSkinPath); - + // check for and read skin package level doctype this.SetSkinDoctype(); @@ -455,7 +455,6 @@ private void InitializePage() // moved this call to OnInit to avoid incorrect CurrentSkinPath if using fallback skin ////this.clientResourceController.RegisterPathNameAlias("SkinPath", this.CurrentSkinPath); - // redirect to a specific tab based on name if (!string.IsNullOrEmpty(this.Request.QueryString["tabname"])) { @@ -880,4 +879,3 @@ private string GetCssVariablesStylesheetCallback(CacheItemArgs args) } } } - diff --git a/DNN Platform/Website/Resources/Shared/scripts/dnn.jquery.js b/DNN Platform/Website/Resources/Shared/scripts/dnn.jquery.js index 87352fe0395..cd4218e190e 100644 --- a/DNN Platform/Website/Resources/Shared/scripts/dnn.jquery.js +++ b/DNN Platform/Website/Resources/Shared/scripts/dnn.jquery.js @@ -693,6 +693,16 @@ $pd.on('mousemove', function (e) { var x = e.pageX; var y = e.pageY; + // Fix: Check if tooltip overflows the right edge of the window + var tipWidth = pd.tooltipWrapperInner.outerWidth(); + var winWidth = $(window).width(); + + // Safety buffer of 20px for vertical scrollbar + if ((x + tipWidth) > (winWidth - 20)) { + // Clamp x position to fit inside the screen + x = winWidth - tipWidth - 20; + } + var pos = $('body').css('position'); if (pos == 'relative') y -= 38; pd.tooltipWrapper.css({ left: x + 'px', top: y + 'px', 'z-index': '99999' }); @@ -4320,4 +4330,5 @@ Sys.WebForms.PageRequestManager.getInstance().add_endRequest(dnnInitCustomisedCtrls); $(dnnInitCustomisedCtrls); handlerSendVerificationMailLink(); -})(jQuery); \ No newline at end of file + +})(jQuery);