Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1069)

Unified Diff: sky/framework/sky-button/sky-button.sky

Issue 866213004: Switch Sky to pointer events (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: nits Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/framework/sky-button/sky-button.sky
diff --git a/sky/framework/sky-button/sky-button.sky b/sky/framework/sky-button/sky-button.sky
index 47170e2f9b75b8f64e11d742385b15dfce653182..34f255a026b403c9ca933d8ac31cd4b0ed38f5c4 100644
--- a/sky/framework/sky-button/sky-button.sky
+++ b/sky/framework/sky-button/sky-button.sky
@@ -8,9 +8,9 @@
<sky-element
name="sky-button"
attributes="highlight:boolean"
- on-mousedown="handleMouseDown"
- on-mouseup="handleMouseUp"
- on-mouseout="handleMouseOut">
+ on-pointerdown="handlePointerDown"
+ on-pointerup="handlePointerUp"
+ on-pointercancel="handlePointerCancel">
<template>
<style>
:host {
@@ -35,13 +35,13 @@ module.exports = class extends SkyElement {
this.tabIndex = 0; // Make focusable.
}
- handleMouseDown() {
+ handlePointerDown() {
this.highlight = true;
}
- handleMouseUp() {
+ handlePointerUp() {
this.highlight = false;
}
- handleMouseOut() {
+ handlePointerCancel() {
this.highlight = false;
}
}.register();

Powered by Google App Engine
This is Rietveld 408576698