Geta / geta-notfoundhandler

The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
Apache License 2.0
20 stars 16 forks source link

Show modal in same position (height) as trigger of modal #81

Closed ellinge closed 2 weeks ago

ellinge commented 1 year ago

Fixes #72

Had to do a bit of a workaround since the table / modal is within an iframe so not easily fixed by only css.

Either way the modal is now positioned based on the offset height of the button which triggered it.

image

ellinge commented 1 year ago

Not sure what to to with the build failing, tests seems to pass but I think your sonar-configuration is off.

Seems to have to do with the build being processed on my fork where the secret is missing: https://community.sonarsource.com/t/sonarcloud-analysis-fails-on-prs-for-c-project-on-github/34260

https://portal.productboard.com/sonarsource/1-sonarcloud/c/50-sonarcloud-analyzes-external-pull-request

marisks commented 1 year ago

The build fails for the reason you wrote. Please ignore it. Regarding the changes, the fix should be possible without JS and just with CSS. Also, it would be good to update Bootstrap to the release version (now it uses Beta) before applying the fix - it might fix the issue. I will take a look at it. If none of it will help, then this PR will be accepted.

ellinge commented 1 year ago

I don’t think it wont be doable with css only because the iframe viewport. It’s if bootstrap has some js to automatically apply it.

Basically this still applies (a quick google): https://stackoverflow.com/questions/8061728/fix-an-element-inside-an-iframe-in-the-center-of-the-screen

marisks commented 1 year ago

You are right. Bootstrap already sets it in the center, but the issue is that it is in an iframe.

jevgenijsp commented 4 weeks ago

The modal will go behind the screen If there are more than 10 referrers in the first entries.

Example: image

There should be a fix for such situations, or better just show it always centered taking into account the current scrolling position.

jevgenijsp commented 2 weeks ago

Closing this ticket due to creating a copy of this with the additional fix: https://github.com/Geta/geta-notfoundhandler/pull/147