mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-09-30 00:56:32 +13:00
Element picker tweaks
- Indentation whitespace fixes. - Use built-in getBoundingClientRect() function instead of self-made. - Use built-in DOM API for manipulating the class attributes instead of altering the className property. - Add pointer-events: none to the svgRoot when using document.elementFromPoint(), but if the browser (older Safari for example) doesn't take the pointer-events into account, then fall back to display: none. - Initiate every part of the picker at the same time; when the message is received from the background. This way the selected element will have the red overlay immediately, instead of showing first the black overlay, then a few milliseconds later the red.
This commit is contained in:
parent
c56d3ca717
commit
9313a7f16b
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ var messagingConnector = function(response) {
|
|||
// Safari bug
|
||||
// Deleting the response.requestId below (only in some cases, probably
|
||||
// when frames are present on the page) will remove it from all the
|
||||
// following messages too, however with the following line it won't.
|
||||
// future messages too, however with the following line it won't.
|
||||
vAPI.safari && console.log;
|
||||
|
||||
delete vAPI.messaging.listeners[response.requestId];
|
||||
|
|
Loading…
Reference in a new issue