From 70fbbb3641fb19d38481b39fdb7c25786d072e34 Mon Sep 17 00:00:00 2001 From: Lex Lim Date: Tue, 27 Dec 2022 23:17:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BD=BF=E7=94=A8=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E8=BE=93=E5=85=A5=E6=B3=95=E4=B8=8D=E4=BC=9A=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E6=90=9C=E7=B4=A2=E6=8F=90=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ext.isekai.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/ext.isekai.js b/modules/ext.isekai.js index 507d987..887a687 100644 --- a/modules/ext.isekai.js +++ b/modules/ext.isekai.js @@ -133,14 +133,18 @@ $(function(){ dom.setSelectionRange(selectionStart, selectionEnd); } } - $('#searchInput, #wpNewTitleMain input, #searchText input[name="search"]').on('input', function(e){ + $('#searchInput, #wpNewTitleMain input, #searchText input[name="search"]').on('input', function(e) { if(!e.originalEvent.isComposing){ replaceChars(this); } }); - $('#searchInput, #wpNewTitleMain input, #searchText input[name="search"]').on('compositionend', function(e){ + $('#searchInput, #wpNewTitleMain input, #searchText input[name="search"]').on('compositionend', function(e) { replaceChars(this); }); + // 修复使用中文输入法不会触发搜索提示的问题 + $('#searchInput').on('compositionend', function() { + $(this).trigger('keypress') + }); // 初始化dialog var messageDialog = new OO.ui.MessageDialog();