hackmdio / hackmdio/codimd

Ctrl+Alt+E Yields € symbol in addition to switching to edit mode.

オープン
#355 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug minor UI/UX
主要言語
JavaScript
スター
10.1k
フォーク
1.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

If I'm in "both" mode, and press Ctrl+Alt+E to switch to "edit" mode, It will work, but it will also put an `€` in the current cursor position.

An `event.preventDefault()` should probably fix this, however, this should only be done, if there's actually a switch happening (meaning: If I'm *already* in edit-mode, please don't `preventDefault`, or we won't be able to type € symbols any more).

**To reproduce**

* (you may need an european keyboard layout, I'm not sure)
* Set any pad to "both" mode where you can see the editor and rendered html at once.
* Make sure, your focus is in the editor, so you can actually type
* press Ctrl+Alt+E

**Current Result**
* The view is being switched *and* you also get € at the current cursor position

**Desired Result**
* when *already* in edit mode: just type the €
* when *not* in edit mode: just switch to edit

I'm not sure if other (Ctrl+Alt+V or Ctrl+Alt+B) shortcuts interfere with anything, they do not on my layout. But this could be a general pattern, I believe.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

エディターにフォーカスがある状態でショートカットを、まず both mode で、次に edit mode で再現します。モード切り替え用のキーボードショートカットの処理を見つけ、€ 文字が抑制されるのはモード切り替えが発生した場合だけであることを確認します。切り替えによって € が生成されず、edit mode での € の入力は引き続き機能すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。