Skip to content

feat: add mixins to handle focus and disabled state - #2233

Merged
web-padawan merged 5 commits into
masterfrom
slot-mixins-3
Jul 30, 2021
Merged

web-padawan merged 5 commits into
masterfrom
slot-mixins-3

Conversation

@web-padawan

@web-padawan web-padawan commented Jul 12, 2021 •

Copy link
Copy Markdown
Member

Description

This is a third batch of mixins that are needed to implement slotted input support in field components.

The code is mostly the same as in ControlStateMixin, but there are two important differences:

  1. We expect the focusElement to be in light DOM so event listeners are updated accordingly,
  2. We no longer set tabindex on the host element, and it is no longer focusable. So we don't handle tabindex and expect the user to set it directly on the slotted <input> if needed (although we should not encourage doing this).

Fixes #2186

Type of change

  • Internal feature

@web-padawan
web-padawan marked this pull request as ready for review July 29, 2021 14:26
@web-padawan
web-padawan requested a review from vursen July 29, 2021 14:27
Comment thread packages/field-base/src/focus-mixin.js Resolved
Comment thread packages/field-base/src/focus-mixin.js Resolved
Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@web-padawan
web-padawan merged commit 7311272 into master Jul 30, 2021
@web-padawan
web-padawan deleted the slot-mixins-3 branch July 30, 2021 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y Accessibility issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add mixins to handle focus and disabled state

2 participants