Skip to content

Commit

Permalink
fixes #2005 (#2006)
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed May 10, 2024
1 parent eb42671 commit d94acc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/pages/resources/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
- Fixed a bug in `<sl-tooltip>` that allowed unwanted text properties to leak in [#1947]
- Fixed a bug in `<sl-button-group>` classes [#1974]
- Fixed a bug in `<sl-textarea>` that may throw errors on `disconnectedCallback` in test environments [#1985]
- Fixed a bug in `<sl-color-picker>` that would log a non-passive event listener warning [#2005]

## 2.15.0

Expand Down
3 changes: 2 additions & 1 deletion src/components/color-picker/color-picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { clamp } from '../../internal/math.js';
import { classMap } from 'lit/directives/class-map.js';
import { defaultValue } from '../../internal/default-value.js';
import { drag } from '../../internal/drag.js';
import { eventOptions, property, query, state } from 'lit/decorators.js';
import { FormControlController } from '../../internal/form.js';
import { html } from 'lit';
import { ifDefined } from 'lit/directives/if-defined.js';
import { LocalizeController } from '../../utilities/localize.js';
import { property, query, state } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import { TinyColor } from '@ctrl/tinycolor';
import { watch } from '../../internal/watch.js';
Expand Down Expand Up @@ -488,6 +488,7 @@ export default class SlColorPicker extends ShoelaceElement implements ShoelaceFo
this.formControlController.emitInvalidEvent(event);
}

@eventOptions({ passive: false })
private handleTouchMove(event: TouchEvent) {
event.preventDefault();
}
Expand Down

0 comments on commit d94acc6

Please sign in to comment.