fix creating link with selection -> must by hyper link, closes #959

This commit is contained in:
zadam 2020-04-11 09:47:19 +02:00
parent 62bc05134e
commit 6c76d862d2
2 changed files with 9 additions and 1 deletions

View file

@ -77,7 +77,7 @@
"yazl": "^2.5.1"
},
"devDependencies": {
"electron": "9.0.0-beta.14",
"electron": "9.0.0-beta.15",
"electron-builder": "22.4.1",
"electron-packager": "14.2.1",
"electron-rebuild": "1.10.1",

View file

@ -20,6 +20,14 @@ export async function showDialog(widget) {
updateTitleFormGroupVisibility();
$addLinkTitleSettings.find('input[type=radio]').on('change', updateTitleFormGroupVisibility);
// with selection hyper link is implied
if (textTypeWidget.hasSelection()) {
$addLinkTitleSettings.find("input[value='hyper-link']").prop("checked", true);
}
else {
$addLinkTitleSettings.find("input[value='reference-link']").prop("checked", true);
}
utils.openDialog($dialog);
$autoComplete.val('').trigger('focus');