1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 16:47:15 +02:00

Clicking again currently inspected row will close the dialog

This commit is contained in:
Raymond Hill 2024-03-02 09:37:15 -05:00
parent 252656968e
commit 7ab7104a54
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -2011,8 +2011,12 @@ dom.on(document, 'keydown', ev => {
};
const toggleOn = async function(ev) {
targetRow = ev.target.closest('.canDetails');
if ( targetRow === null ) { return; }
const clickedRow = ev.target.closest('.canDetails');
if ( clickedRow === null ) { return; }
if ( clickedRow === targetRow ) {
return toggleOff();
}
targetRow = clickedRow;
ev.stopPropagation();
targetTabId = tabIdFromAttribute(targetRow);
targetType = targetRow.children[COLUMN_TYPE].textContent.trim() || '';