1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Ensure no negative value for top property of floating widget in logger

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2704
This commit is contained in:
Raymond Hill 2023-06-30 11:45:34 -04:00
parent b9a24a6f0b
commit b44815f0c8
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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(