Skip to content

bug: clearOnEdit should not clear input when tabbing to next input #27746

Closed

Description

@jmedellinc

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

The clearOnEdit option of ion-input is supposed to clear the content of the ion-input when a new character is entered

If filling a form with the keyboard, if you tab into an input which has contents and then you tab into another input, the input clears, which i think is not what's expected?

Expected Behavior

The input should not be erased if the input "entered" is the tab key..

Steps to Reproduce

  1. Go to https://ionicframework.com/docs/api/input#clear-options
  2. Activate the text input which has clearOnEdit activated
  3. tab change into the following input
  4. Shift-Tab into the previous input, which results in the input with clearOnEdit option activated and it has already text
  5. Tab again to change into the next input
  6. ... the input clears..

Code Reproduction URL

https://ionicframework.com/docs/api/input#clear-options

Ionic Info

Latest.. Test based on ionic Docs

Additional Information

No response

Activity

  1. changed the title [-]bug: clearOnEdit (ion-input) identifies TAB as edit[/-] [+]bug: clearOnEdit should not clear input when tabbing to next input[/+] on Jul 5, 2023
  2. added
    package: core
    type: bug
    on Jul 5, 2023
  3. liamdebeasi commented on Aug 16, 2023

    @liamdebeasi
    Contributor

    Thanks for the report. Here is a dev build with a proposed fix if you are interested in testing: 7.3.1-dev.11692202566.13cd16c4

    Install Example: npm install @ionic/[email protected]

  4. added a commit that references this issue on Aug 18, 2023
    444acc1
  5. liamdebeasi commented on Aug 18, 2023

    @liamdebeasi
    Contributor

    Thanks for the issue. This has been resolved via #28005, and a fix will be available in an upcoming release of Ionic Framework. Feel free to keep testing the dev build, and let me know if you have any questions.

  6. ionitron-bot commented on Sep 17, 2023

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  7. locked and limited conversation to collaborators on Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions