Skip to content

Commit

Permalink
fix: Fix bug that prevented keyboard navigation of color swatches.
Browse files Browse the repository at this point in the history
  • Loading branch information
gonfunko committed Jan 17, 2025
1 parent 58be365 commit 184a63c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/field-colour/src/field_colour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export class FieldColour extends Blockly.Field<string> {
* @param dy Change of y.
*/
private moveHighlightBy(dx: number, dy: number) {
if (!this.highlightedIndex) {
if (this.highlightedIndex === null) {
return;
}

Expand Down Expand Up @@ -564,7 +564,7 @@ export class FieldColour extends Blockly.Field<string> {
* @returns Highlighted item (null if none).
*/
private getHighlighted(): HTMLElement | null {
if (!this.highlightedIndex) {
if (this.highlightedIndex === null) {
return null;
}

Expand Down

0 comments on commit 184a63c

Please sign in to comment.