Fixed #1503.
This commit is contained in:
parent
1b2d48ff22
commit
78802448c3
@ -3,7 +3,7 @@
|
||||
<div class="modal__content">
|
||||
<p>Please provide a <b>URL</b> for your image.</p>
|
||||
<form-entry label="URL" error="url">
|
||||
<input slot="field" class="textfield" type="text" v-model.trim="url" @keydown.enter="resolve()">
|
||||
<input slot="field" class="textfield" type="text" v-model.trim="url" @keydown.enter="resolve">
|
||||
</form-entry>
|
||||
<menu-entry @click.native="openGooglePhotos(token)" v-for="token in googlePhotosTokens" :key="token.sub">
|
||||
<icon-provider slot="icon" provider-id="googlePhotos"></icon-provider>
|
||||
@ -44,7 +44,8 @@ export default modalTemplate({
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
resolve() {
|
||||
resolve(evt) {
|
||||
evt.preventDefault(); // Fixes https://github.com/benweet/stackedit/issues/1503
|
||||
if (!this.url) {
|
||||
this.setError('url');
|
||||
} else {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="modal__content">
|
||||
<p>Please provide a <b>URL</b> for your link.</p>
|
||||
<form-entry label="URL" error="url">
|
||||
<input slot="field" class="textfield" type="text" v-model.trim="url" @keydown.enter="resolve()">
|
||||
<input slot="field" class="textfield" type="text" v-model.trim="url" @keydown.enter="resolve">
|
||||
</form-entry>
|
||||
</div>
|
||||
<div class="modal__button-bar">
|
||||
@ -21,7 +21,8 @@ export default modalTemplate({
|
||||
url: '',
|
||||
}),
|
||||
methods: {
|
||||
resolve() {
|
||||
resolve(evt) {
|
||||
evt.preventDefault(); // Fixes https://github.com/benweet/stackedit/issues/1503
|
||||
if (!this.url) {
|
||||
this.setError('url');
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user