Skip to content

Commit b44815f

Browse files
committed
Ensure no negative value for top property of floating widget in logger
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2704
1 parent b9a24a6 commit b44815f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/js/logger-ui.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2044,10 +2044,13 @@ dom.on(document, 'keydown', ev => {
20442044
if ( typeof response !== 'string' ) { return; }
20452045
const settings = JSON.parse(response);
20462046
const widget = qs$('#netInspector .entryTools');
2047-
widget.style.bottom = settings.bottom || '';
2047+
widget.style.bottom = '';
20482048
widget.style.left = settings.left || '';
20492049
widget.style.right = settings.right || '';
20502050
widget.style.top = settings.top || '';
2051+
if ( /^-/.test(widget.style.top) ) {
2052+
widget.style.top = '0';
2053+
}
20512054
});
20522055

20532056
dom.on(

0 commit comments

Comments
 (0)