mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 07:41:51 +08:00
feat(checkbox): add checkbox missing focus on tab (#30075)
Issue number: internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Added ion-focusable class to ion-checkbox - Replaced ionic focus styles for focus mixin ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> - [Ionic states sample](https://ionic-framework-my9hzgra2-ionic1.vercel.app/src/components/checkbox/test/states?ionic:theme=ionic) --------- Co-authored-by: ionitron <hi@ionicframework.com>
This commit is contained in:
@ -380,8 +380,7 @@ input {
|
||||
// --------------------------------------------------
|
||||
// Only show the focus ring when the checkbox is focused and not disabled
|
||||
:host(.ion-focused:not(.checkbox-disabled)) .native-wrapper {
|
||||
outline: var(--focus-ring-width) globals.$ion-border-style-solid var(--focus-ring-color);
|
||||
outline-offset: var(--focus-ring-offset);
|
||||
@include globals.focused-state(var(--focus-ring-width), globals.$ion-border-style-solid, var(--focus-ring-color));
|
||||
}
|
||||
|
||||
// Checkbox: Active
|
||||
|
||||
@ -212,6 +212,7 @@ export class Checkbox implements ComponentInterface {
|
||||
'in-item': hostContext('ion-item', el),
|
||||
'checkbox-checked': checked,
|
||||
'checkbox-disabled': disabled,
|
||||
'ion-focusable': true,
|
||||
'checkbox-indeterminate': indeterminate,
|
||||
interactive: true,
|
||||
[`checkbox-justify-${justify}`]: justify !== undefined,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
Reference in New Issue
Block a user