Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging a list item with a specific input contained within it casues a console error #9294

Open
2 of 6 tasks
BennyBaruba opened this issue May 9, 2024 · 1 comment
Open
2 of 6 tasks
Labels
0 - new New issues that need assignment. ArcGIS Mission Issues logged by ArcGIS Mission team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone needs triage Planning workflow - pending design/dev review.

Comments

@BennyBaruba
Copy link

BennyBaruba commented May 9, 2024

Check existing issues

Actual Behavior

We use a list and list items to create new report fields and reorder them in the Mission Manger app of ArcGIS Mission. If the user clicks on the pencil in the screenshot to activate the field title input and then clicks to the drag handle for any report field to re-order the field. The console error in the last screenshot is thrown. The console error does not affect the usability of the UI.

Step 1
Screenshot 2024-05-09 142118
Step 2
Screenshot 2024-05-09 142123
Step 3
Screenshot 2024-05-09 142129

Expected Behavior

User should be able to switch focus to the input and then drag and drop another List Item. Without getting a console error.

Reproduction Sample

See steps below...

Reproduction Steps

The following is the code we are using. Default state shows the field label as text. Then when the user clicks on the pencil edit button it turns into a input with either the untitled field label or user defined title.

I also noticed this in the help
image

We have actionable content in the content slot. Might that be one of the reasons why the console is coming up? Other than the console coming up the list item appears to be working for our use in the MIssion report area of the app.

 const inlineEditableHolder = (field.fieldEditing || labelError) && (
      <div
        class={this.classes(
          flex.boxCFsFs,
          sizing.width100,
          leaders.leaderHalf,
          margins.marginRightQuarter,
          CSS.inputFieldLabelHeight
        )}
      >
        {inlineEditable}
        <div class={this.classes(flex.boxRFsFs)} key={fieldKey}>
          {fieldLabelCharacterCount}
        </div>
      </div>
    );

    const button = Button({
      label: this._t9n.edit,
      iconStart: "pencil",
      scale: "m",
      appearance: "transparent",
      kind: "neutral",
      onClick: () => {
        field.fieldEditing = true;
      }
    });

    const untitledField = !field.fieldEditing && !labelError && (
      <div class={this.classes(flex.boxRFsCtr)}>
        <span
          class={this.classes(
            margins.marginRightQuarter,
            fontSizes.fontSizeMinus1,
            text.textLeft
          )}
        >
          {field.label || this._t9n.untitledField}
        </span>
        {button}
      </div>
    );

Reproduction Version

2.8.0 (April 2024)

Relevant Info

image
image

Regression?

no

Priority impact

p2 - want for current milestone

Impact

minor

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Mission

@BennyBaruba BennyBaruba added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels May 9, 2024
@github-actions github-actions bot added impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone calcite-components Issues specific to the @esri/calcite-components package. ArcGIS Mission Issues logged by ArcGIS Mission team members. labels May 9, 2024
@driskull
Copy link
Member

Hi @BennyBaruba I'm not seeing the console error when using a codepen. Are you able to provide a reproduction?

https://codepen.io/driskull/pen/mdYOvev?editors=1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Mission Issues logged by ArcGIS Mission team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

2 participants