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