1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 15:32:28 +02:00
This commit is contained in:
gorhill 2014-09-28 14:58:26 -04:00
parent f0c2285dae
commit e318f5056c

View File

@ -954,6 +954,8 @@ var startPicker = function() {
urlNormalizer = document.createElement('a');
window.addEventListener('scroll', onScrolled);
document.addEventListener('keydown', onKeyPressed);
highlightElements([], true);
};
/******************************************************************************/
@ -985,9 +987,11 @@ messaging.ask({ what: 'elementPickerArguments' }, function(details) {
// Try using mouse position
if ( details.clientX !== -1 ) {
elem = elementFromPoint(details.clientX, details.clientY);
filtersFromElement(elem);
showDialog();
return;
if ( elem !== null ) {
filtersFromElement(elem);
showDialog();
return;
}
}
// No mouse position available, use suggested target
@ -1027,6 +1031,8 @@ messaging.ask({ what: 'elementPickerArguments' }, function(details) {
}
});
// https://www.youtube.com/watch?v=sociXdKnyr8
/******************************************************************************/
})();