ibm-products icon indicating copy to clipboard operation
ibm-products copied to clipboard

EditInPlace: focus lost when clicking on disabled save button

Open davidmenendez opened this issue 5 months ago • 4 comments

Package

Carbon for IBM Products

Description

when EditInPlace is in focus, if you click cancel the focus remains on the component, but if you click cancel focus is lost entirely.

i don't believe this is the intended behavior. i'm also not sure if clicking cancel should take away focus from the actual input. we should verify what the intended behavior is before fixing.

Component(s) impacted

EditInPlace

Browser

Chrome

@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version

2.49.1

Suggested Severity

Severity 3 = The problem is visible or noticeable to users but does not impede the usability or functionality. Affects minor functionality, has a workaround.

Product/offering

ibm products

CodeSandbox or Stackblitz example

https://carbon-for-ibm-products.netlify.app/?path=/story/ibm-products-patterns-edit-and-update-editinplace--default&globals=viewport:basic

Steps to reproduce the issue (if applicable)

  1. click EditInPlace in order to focus the input. the cancel and save buttons should appear from the right of the input. save should be disabled.
  2. without altering the input, click the disabled save button
  3. observe how focus from the component is lost entirely

Release date (if applicable)

No response

Code of Conduct

davidmenendez avatar Sep 24 '24 17:09 davidmenendez