code review: fix case of picker trying to pick itself

This commit is contained in:
gorhill 2014-10-13 09:38:36 -04:00
parent 65a9e38f91
commit 8ddf1f4b47

View file

@ -987,15 +987,8 @@ var startPicker = function() {
document.addEventListener('keydown', onKeyPressed);
highlightElements([], true);
};
/******************************************************************************/
startPicker();
/******************************************************************************/
messaging.ask({ what: 'elementPickerArguments' }, function(details) {
var initPicker = function(details) {
var i18nMap = {
'#create': 'create',
'#pick': 'pick',
@ -1059,7 +1052,16 @@ messaging.ask({ what: 'elementPickerArguments' }, function(details) {
showDialog({ modifier: true });
return;
}
});
};
messaging.ask({ what: 'elementPickerArguments' }, initPicker);
};
/******************************************************************************/
startPicker();
/******************************************************************************/
// https://www.youtube.com/watch?v=sociXdKnyr8