Skip to content

Commit

Permalink
fix: include touch-action rule for draggable content
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook Johnson authored and Westbrook committed May 12, 2021
1 parent 96bd01a commit 3f507e6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/color-area/src/color-area.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ governing permissions and limitations under the License.

@import './spectrum-color-area.css';

:host {
touch-action: none;
}

:host:before {
pointer-events: none;
}
Expand Down
4 changes: 4 additions & 0 deletions packages/color-handle/src/color-handle.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ governing permissions and limitations under the License.
*/

@import './spectrum-color-handle.css';

:host {
touch-action: none;
}
8 changes: 8 additions & 0 deletions packages/color-slider/src/color-slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ governing permissions and limitations under the License.
rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%;
}

:host(:not([vertical])) {
touch-action: pan-y;
}

:host([vertical]) {
touch-action: pan-x;
}

.gradient {
overflow: hidden;
}
Expand Down
4 changes: 4 additions & 0 deletions packages/color-wheel/src/color-wheel.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ governing permissions and limitations under the License.
*/

@import './spectrum-color-wheel.css';

:host {
touch-action: none;
}
4 changes: 2 additions & 2 deletions packages/slider/src/slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ governing permissions and limitations under the License.
outline-width: 0;
}

#handle {
touch-action: none;
:host {
touch-action: pan-y;
}

.not-exact.ticks {
Expand Down

0 comments on commit 3f507e6

Please sign in to comment.