Skip to content

Commit

Permalink
Ensure no negative value for top property of floating widget in logger
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Jun 30, 2023
1 parent b9a24a6 commit b44815f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/logger-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2044,10 +2044,13 @@ dom.on(document, 'keydown', ev => {
if ( typeof response !== 'string' ) { return; }
const settings = JSON.parse(response);
const widget = qs$('#netInspector .entryTools');
widget.style.bottom = settings.bottom || '';
widget.style.bottom = '';
widget.style.left = settings.left || '';
widget.style.right = settings.right || '';
widget.style.top = settings.top || '';
if ( /^-/.test(widget.style.top) ) {
widget.style.top = '0';
}
});

dom.on(
Expand Down

1 comment on commit b44815f

@gwarser
Copy link
Contributor

Choose a reason for hiding this comment

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

Please sign in to comment.