Skip to content

Commit 189c9d5

Browse files
committed
convenience: shift-click to stay in element-zapper mode
1 parent c1589ca commit 189c9d5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/js/scriptlets/element-picker.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,8 @@ var zap = function() {
12141214
document.documentElement.style.setProperty('overflow', 'auto', 'important');
12151215
}
12161216
elem.parentNode.removeChild(elem);
1217+
elem = elementFromPoint();
1218+
highlightElements(elem ? [elem] : []);
12171219
};
12181220

12191221
/******************************************************************************/
@@ -1281,7 +1283,9 @@ var onSvgClicked = function(ev) {
12811283
}
12821284
if ( pickerBody.classList.contains('zap') ) {
12831285
zap();
1284-
stopPicker();
1286+
if ( !ev.shiftKey ) {
1287+
stopPicker();
1288+
}
12851289
return;
12861290
}
12871291
showDialog();
@@ -1304,8 +1308,6 @@ var onKeyPressed = function(ev) {
13041308
ev.stopPropagation();
13051309
ev.preventDefault();
13061310
zap();
1307-
elem = elementFromPoint();
1308-
highlightElements(elem ? [elem] : []);
13091311
return;
13101312
}
13111313
// Esc

0 commit comments

Comments
 (0)