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

fix(angular): popover arrow navigation with disabled items #29662

Merged
merged 3 commits into from
Jun 26, 2024

Conversation

brandyscarney
Copy link
Member

Issue number: resolves #29640


What is the current behavior?

(Angular) If a list inside of a popover contains a disabled item and is included in the following way:

<ion-list>
  <ion-item [button]="true">Option 1</ion-item>
  <ion-item [button]="true" [disabled]="true">Option 2</ion-item>
  <ion-item [button]="true">Option 3</ion-item>
</ion-list>

when you try to navigate using the arrow down keys, it will stop at the disabled item instead of continuing over it.

Note that changing the item to the following will work:

<ion-item [button]="true" disabled="true">Option 2</ion-item>

What is the new behavior?

Reflect the disabled property in the item so that when items are queried in the popover, the arrow down key skips over the disabled item.

Does this introduce a breaking change?

  • Yes
  • No

Other information

This can be tested in the Angular test app by following the documentation here: https://github.com/ionic-team/ionic-framework/blob/main/docs/angular/testing.md

Removing my fix in core, then running npm run build and re-syncing the test app should reproduce the problem.

Copy link

vercel bot commented Jun 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 25, 2024 9:18pm

@github-actions github-actions bot added package: core @ionic/core package package: angular @ionic/angular package labels Jun 25, 2024
@brandyscarney brandyscarney changed the title fix(angular): reflect disabled property on item to bind properly in popover fix(angular): reflect disabled property on item to bind properly in popover Jun 25, 2024
@brandyscarney brandyscarney marked this pull request as ready for review June 25, 2024 20:50
@brandyscarney brandyscarney requested a review from a team as a code owner June 25, 2024 20:50
@brandyscarney brandyscarney changed the title fix(angular): reflect disabled property on item to bind properly in popover fix(angular): popover arrow navigation with disabled items Jun 25, 2024
@brandyscarney brandyscarney added this pull request to the merge queue Jun 26, 2024
Merged via the queue into main with commit ceb41f3 Jun 26, 2024
48 checks passed
@brandyscarney brandyscarney deleted the ROU-10858 branch June 26, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: ion-popover arrow navigation breaks on disabled element
2 participants