iOSで投稿フォームに自動フォーカスしない問題を修正

This commit is contained in:
syuilo 2019-05-21 17:39:23 +09:00
parent 391be342ac
commit b44afc1876
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 7 additions and 8 deletions

View File

@ -25,6 +25,7 @@ import MkShare from '../common/views/pages/share.vue';
import MkFollow from '../common/views/pages/follow.vue'; import MkFollow from '../common/views/pages/follow.vue';
import MkNotFound from '../common/views/pages/not-found.vue'; import MkNotFound from '../common/views/pages/not-found.vue';
import DeckColumn from '../common/views/deck/deck.column-template.vue'; import DeckColumn from '../common/views/deck/deck.column-template.vue';
import PostFormDialog from './views/components/post-form-dialog.vue';
import FileChooser from './views/components/drive-file-chooser.vue'; import FileChooser from './views/components/drive-file-chooser.vue';
import FolderChooser from './views/components/drive-folder-chooser.vue'; import FolderChooser from './views/components/drive-folder-chooser.vue';
@ -50,16 +51,15 @@ init((launch, os) => {
document.documentElement.style.overflow = 'auto'; document.documentElement.style.overflow = 'auto';
} }
this.$root.newAsync(() => import('./views/components/post-form-dialog.vue').then(m => m.default), { const vm = this.$root.new(PostFormDialog, {
reply: o.reply, reply: o.reply,
mention: o.mention, mention: o.mention,
renote: o.renote renote: o.renote
}).then(vm => {
vm.$once('cancel', recover);
vm.$once('posted', recover);
if (o.cb) vm.$once('closed', o.cb);
(vm as any).focus();
}); });
vm.$once('cancel', recover);
vm.$once('posted', recover);
if (o.cb) vm.$once('closed', o.cb);
(vm as any).focus();
}, },
$chooseDriveFile(opts) { $chooseDriveFile(opts) {

View File

@ -59,12 +59,11 @@ import { erase, unique } from '../../../../../prelude/array';
import { length } from 'stringz'; import { length } from 'stringz';
import { toASCII } from 'punycode'; import { toASCII } from 'punycode';
import extractMentions from '../../../../../misc/extract-mentions'; import extractMentions from '../../../../../misc/extract-mentions';
import XPostFormAttaches from '../../../common/views/components/post-form-attaches.vue';
export default Vue.extend({ export default Vue.extend({
i18n: i18n('mobile/views/components/post-form.vue'), i18n: i18n('mobile/views/components/post-form.vue'),
components: { components: {
XPostFormAttaches, XPostFormAttaches: () => import('../../../common/views/components/post-form-attaches.vue').then(m => m.default),
XPollEditor: () => import('../../../common/views/components/poll-editor.vue').then(m => m.default) XPollEditor: () => import('../../../common/views/components/poll-editor.vue').then(m => m.default)
}, },