このサイトはJavaScriptを使用しています
ホーム
エクスプローラー
ヘルプ
サインイン
abunchtell
/
mastodon
ウォッチ
1
スター
0
フォーク
0
コード
課題
0
アクティビティ
ソースを参照
Additional key checks for browser compatibility (
#2539
)
Not all browsers recognize e.key === 'Escape'; some use 'Esc' and some only respond to the keyCode.
master
Noëlle Anthony
7年前
committed by
Matt Jankowski
親
2e47fe3e1a
コミット
c67d3c990b
1個のファイルの変更
、
2行の追加
、
1行の削除
分割表示
差分オプション
統計情報を表示
Patchファイルをダウンロード
Diffファイルをダウンロード
+2
-1
app/assets/javascripts/components/features/ui/components/modal_root.jsx
+ 2
- 1
app/assets/javascripts/components/features/ui/components/modal_root.jsx
ファイルの表示
@@ -22,7 +22,8 @@ class ModalRoot extends React.PureComponent {
}
handleKeyUp (e) {
if (e.key === 'Escape' && !!this.props.type) {
if ((e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27)
&& !!this.props.type) {
this.props.onClose();
}
}
書き込み
プレビュー
読み込み中…
キャンセル
保存