mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
This commit is contained in:
parent
9642f5f715
commit
1354c247b4
@ -34,11 +34,14 @@ joplin.plugins.register({
|
||||
Name: <input type="text" name="name"/>
|
||||
<br/>
|
||||
Email: <input type="text" name="email"/>
|
||||
<br/>
|
||||
Description: <textarea name="desc"></textarea>
|
||||
</form>
|
||||
`);
|
||||
|
||||
const result3 = await dialogs.open(handle3);
|
||||
console.info('Got result: ' + JSON.stringify(result3));
|
||||
|
||||
},
|
||||
|
||||
});
|
||||
|
@ -15,7 +15,13 @@ export default function(frameWindow: any, onSubmit: Function, onDismiss: Functio
|
||||
}
|
||||
|
||||
if (event.key === 'Enter') {
|
||||
if (onSubmit) onSubmit();
|
||||
//
|
||||
// Disable enter key from submitting when a text area is in focus!
|
||||
// https://github.com/laurent22/joplin/issues/4766
|
||||
//
|
||||
if (frameWindow.document.activeElement.tagName != 'TEXTAREA') {
|
||||
if (onSubmit) onSubmit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user