instructure/instructure-ui

SourceCodeEditor doesn't delete text when text is selected.

buckett opened this issue · 2 comments

Background Information

Package Version(s):
Instructure UI 8.35.0

Browser:
Chrome: Version 110.0.5481.100 (Official Build) (arm64)

OS:
Mac OS 13.1 (22C65)

Device:
Mac

Component:
SourceCodeEditor

Describe the Bug

When selecting all the text (with keyboard) in a SourceCodeEditor and pressing delete nothing happens. Repeating the process results in it working. This only happens with the component is in controlled mode.

Steps To Reproduce

  • Go to https://instructure.design/#SourceCodeEditor and find the language support example.
  • Click into the editor and then press ⌘-a to select all the text (⌃-a on Windows/Linux).
  • Press ⌫ (backspace) to delete all the selected text.

Expected Behavior

All the text in the component is deleted.

Additional Information

Current Workaround(s):
Switch to be uncontrolled component (remove value attribute).

Requested Priority:
Low

Thanks for the report! We will look into it and keep you posted!

ke1k0 commented

Hi @buckett ! Thank you for the report, the fix has been released in v8.35.1