web-components icon indicating copy to clipboard operation
web-components copied to clipboard

Page break shortcut does not work consistently

Open Michael-Grover opened this issue 4 years ago • 6 comments

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

Michael-Grover avatar Feb 23 '21 18:02 Michael-Grover

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

K-Kumar-01 avatar Feb 23 '21 19:02 K-Kumar-01

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

Michael-Grover avatar Feb 23 '21 19:02 Michael-Grover

@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.

Michael-Grover avatar Feb 23 '21 20:02 Michael-Grover

@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.

d-e-v-esh avatar Feb 24 '21 08:02 d-e-v-esh

@d-e-v-esh I've assigned it to you now, thanks 👍

Michael-Grover avatar Feb 24 '21 16:02 Michael-Grover

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

Michael-Grover avatar Sep 23 '21 14:09 Michael-Grover