accordproject / web-components

React Components for Accord Project
Apache License 2.0
117 stars 94 forks source link

Page break shortcut does not work consistently #263

Open Michael-Grover opened 3 years ago

Michael-Grover commented 3 years ago

Bug Report πŸ›

Using the shortcut for creating a page break (command or control + enter) only works when creating a page break after a heading.

Expected Behavior

Pressing the page break keyboard shortcut should have the same effect as clicking on the page break icon. Whenever clicking on the page break icon can create a page break, pressing the keyboard shortcut should be able to as well.

Current Behavior

The keyboard shortcut only works when creating a page break after a heading.

Steps to Reproduce

  1. Go to the markdown editor in the storybook
  2. Place your cursor after "My Heading" and press the page break shortcut on your keyboard (on mac it's cmd+enter). A page break has been created πŸ‘
  3. Place your cursor after "This is text. This is italic text. This is bold text. This is a link. This is inline code." and press the page break shortcut on your keyboard. Nothing happens.
  4. Press the page break icon in the formatting toolbar. A page break has been created. Notice that clicking on the icon works but they keyboard shortcut does not.

Context (Environment)

Google Chrome, Macbook Pro, Mac OS Big Sur

K-Kumar-01 commented 3 years ago

@Michael-Grover I would like to have a go at the issue.

Michael-Grover commented 3 years ago

@K-Kumar-01 thanks, I've assigned it to you

Michael-Grover commented 3 years ago

@K-Kumar-01 , I forgot that @d-e-v-esh mentioned they already started looking into this issue. Before you start on this, let's see if @d-e-v-esh would like to finish it.

d-e-v-esh commented 3 years ago

@Michael-Grover I would like to really like to finish it. I looked into it for quite some time now. I'll tell you if I need some help. Edit: I have found the issue. Working on it now. This bug seems to have been introduced from a pull request 4 months ago.

Michael-Grover commented 3 years ago

@d-e-v-esh I've assigned it to you now, thanks πŸ‘

Michael-Grover commented 2 years ago

I'm going through old issues I created and it looks like this one hasn't been resolved so I'm keeping it open