作成日: 2019/09/17 最終更新日: 2019/09/25
文書種別
不具合
発生環境
IE、Edgeでのみ発生
状況
修正済み
詳細
マスクコントロールにマスク書式を設定すると、IEではマスク書式を設定したすべてのマスクコントロールに、フォーカス取得時のスタイルが同時に適用されます。
また、Edgeではコントロールにフォーカスが設定されますが、フォーカス取得時のスタイルが適用されません。
また、Edgeではコントロールにフォーカスが設定されますが、フォーカス取得時のスタイルが適用されません。
回避方法
この問題は、InputManJS V2.2Jで修正されました。
修正版を適用しない場合の回避方法は次の通りです。
1.フォーカス設定用のダミーのHTML要素を定義してフォーカスを設定します。
2.onFocusOutイベントで、"gcim_focused"クラスをコントロールから削除します。
◆サンプルコード(HTML)
----------------------------------------------------
<input id="focus" type="text" style="position:absolute; left: -1000px; top: -1000px">
----------------------------------------------------
◆サンプルコード(JavaScript)
----------------------------------------------------
gcMask1.onFocusOut(function(){
gcMask1.getExtensionEl().classList.remove("gcim_focused");
});
gcMask2.onFocusOut(function(){
gcMask2.getExtensionEl().classList.remove("gcim_focused");
});
gcMask3.onFocusOut(function(){
gcMask3.getExtensionEl().classList.remove("gcim_focused");
});
document.getElementById('focus').focus();
----------------------------------------------------
修正版を適用しない場合の回避方法は次の通りです。
1.フォーカス設定用のダミーのHTML要素を定義してフォーカスを設定します。
2.onFocusOutイベントで、"gcim_focused"クラスをコントロールから削除します。
◆サンプルコード(HTML)
----------------------------------------------------
<input id="focus" type="text" style="position:absolute; left: -1000px; top: -1000px">
----------------------------------------------------
◆サンプルコード(JavaScript)
----------------------------------------------------
gcMask1.onFocusOut(function(){
gcMask1.getExtensionEl().classList.remove("gcim_focused");
});
gcMask2.onFocusOut(function(){
gcMask2.getExtensionEl().classList.remove("gcim_focused");
});
gcMask3.onFocusOut(function(){
gcMask3.getExtensionEl().classList.remove("gcim_focused");
});
document.getElementById('focus').focus();
----------------------------------------------------
旧文書番号
84488