Skip to content
1 change: 1 addition & 0 deletions web/skins/classic/views/watch.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@
?>
</ul>
</nav>
<div style="padding-right:1px; margin-right: -1px;"></div> <--! REQUIRED https://github.com/ZoneMinder/zoneminder/pull/4721 -->
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces an anonymous empty spacer <div> with inline styles and magic numbers (1px / -1px), which is hard to understand and maintain. Consider giving it an id/class (and aria-hidden="true") and moving the styling into the skin CSS with a short explanation of what layout shift it prevents.

Suggested change
<div style="padding-right:1px; margin-right: -1px;"></div> <--! REQUIRED https://github.com/ZoneMinder/zoneminder/pull/4721 -->
<style>
/* Spacer prevents a 1px horizontal layout shift between the nav sidebar
* and the monitor wrapper when scrollbars appear/disappear in some browsers.
* See https://github.com/ZoneMinder/zoneminder/pull/4721
*/
.monitor-layout-spacer {
padding-right: 1px;
margin-right: -1px;
}
</style>
<div class="monitor-layout-spacer" aria-hidden="true"></div>

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@connortechnology
I'm not sure Copilot's comment is necessary; it would add a lot of unnecessary code.
Isaac, the final word is yours.

<div id="wrapperMonitor" class="container-fluid col">
<div id="monitor" class="monitor hidden-shift"
>
Expand Down
Loading