作成日: 2025/02/21 最終更新日: 2025/11/13
文書種別
不具合
発生環境
・5.20242.21以降のバージョンで発生
・Android端末、ブラウザはChrome(オプションにあるPCサイト表示のチェックがONの場合)
・Windows11環境(ソフトキーボードがポップアップするデバイスでのみ再現)
状況
修正済み
詳細
タッチデバイス環境でFlexGridのセルをタップして編集可能にしたときに、ソフトウェアキーボードが一瞬表示されてすぐに閉じてしまいます。
回避方法
この問題はバージョン5.20252.42で修正されました。
修正版を適用しない場合の回避方法は次の通りです。
wijmo.isMobileメソッドを書き直すことでモバイルデバイスの認識を強化します。
wijmo.isMobile = ()=> {
const userAgent = navigator.userAgent.toLowerCase();
const mobileKeywords = [
'android', 'webos', 'iphone', 'ipad', 'ipod', 'blackberry',
'windows phone', 'mobile', 'mobi', 'tablet'
];
const isMobileUserAgent = mobileKeywords.some(keyword => userAgent.includes(keyword));
const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0; // enhanced
return isMobileUserAgent || isTouchDevice;
}
・・・
// ***「5.20242.21」をご利用の場合には、上記に加え下記のコードも追記します。***
function initialized(grid) {
・・・
// 回避方法 (for version 5.20242.21)
fixTheSoftKeyboardProblem(grid);
}
function fixTheSoftKeyboardProblem(grid) {
var listenerRes = grid._listeners.filter(function (listener) {
return (
listener.type === "resize" && listener.target.hasOwnProperty("location")
);
});
if (listenerRes && listenerRes.length === 1) {
var listener = listenerRes[0];
grid.removeEventListener(listener.target, listener.type, listener.fn);
grid.addEventListener(listener.target, listener.type, function () {
if (!wijmo.isMobile()) {
listener.fn.call(grid);
}
});
}
}