Simon-Initiative / oli-torus

Next Generation OLI Authoring and Delivery Platform
https://proton.oli.cmu.edu
MIT License
83 stars 35 forks source link

[BUG FIX] [MER-3423] Using keyboard shortcut (ctrl-del) to delete after a component has been copied causes issues #4955

Closed dtiwarATS closed 2 months ago

dtiwarATS commented 2 months ago

Hey @bsparks Could you please look at this PR.

This PR contains fix for the following things:

  1. Using keyboard shortcut (ctrl-v) to paste after a component has been copied causes issues
  2. Using keyboard shortcut (ctrl-del) to delete after a component has been copied causes issues

Apart from this, I also fixed the original request to delete a selected component when user press 'Delete / Backspace' keys. In the past, there were issues related to 'Delete / Backspace' so we used 'Cntrl + Delete / Backspace' but now I have fixed all the issues and now we can use 'Delete / Backspace' to delete a component.

I had to handle the 'Delete / Backspace' key press at all the places in the simple as well as Advance authoring.