Backspace not working in TextArea when nested in the Console layout

  • 1
  • Problem
  • Updated 2 years ago
  • In Progress
I have a skuid page in an iframe rendered in the community console view for a case. I have an edit button that changes theCase model from edit to read only mode.

I ran into an issue where the textarea changes to edit mode. When I do, I can't seem to backspace and remove the text. I checked the console shortcut keys to ensure that backspace wasn't being overriden but there was nothing bound to the backspace key. The problem only occurs when nested in an iframe.


I can delete by using the delete key or highlighting over the text. 

Any thoughts?
Photo of Joe Ortiz

Joe Ortiz

  • 142 Points 100 badge 2x thumb
  • Confused

Posted 3 years ago

  • 1
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Hmm, this is strange. Does this happen in all browsers? Or just a particular browser/device?
Photo of Joe Ortiz

Joe Ortiz

  • 142 Points 100 badge 2x thumb
It's happening in Chrome, Safari, IE and firefox
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Hi Joe,

I found this bit of code in Salesforce's ServiceDeskView.js file.



It basically says, if the active element is a "INPUT" or "TEXTAREA" element, don't let the event do its default behavior. Since this listener is on the document element, I think it is interfering with CKEditor's key processing.

So from my analysis, this is happening because of how code in CKEditor and the Salesforce Service Desk interact. I'll take another look at this tomorrow and see if I can come up with a workaround.
Photo of Joe Ortiz

Joe Ortiz

  • 142 Points 100 badge 2x thumb
Yeah the console view is tricky.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
I'm pretty sure their code is to prevent the backspace key from doing anything when you're not in a textarea or input element. This is most likely to prevent the unintentional "browser back button" behavior of the backspace key. The problem is that we use the "contenteditible" version of CKEditor, which uses just a normal div, not a textarea or input element.
Photo of Joe Ortiz

Joe Ortiz

  • 142 Points 100 badge 2x thumb
Any luck or workarounds?
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,220 Points 5k badge 2x thumb

Hi Joe~

Unfortunately, this is a Salesforce bug that Skuid currently does not have a workaround for. We will let you know when we have addressed this in a future release.

Thanks!

Karen
Photo of Rob Alexander

Rob Alexander

  • 62 Points
Here is a link to this Salesforce known issue:
I encourage everybody reading this to click the "This Issue Affects me" button on that page, which will increase the priority of this getting fixed by Salesforce. Thank you.