Skip to content

Commit bfd8cc0

Browse files
fix(addon/components/paper-button): fixes on click event bubbling.
1 parent df5f109 commit bfd8cc0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

addon/components/paper-button.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,19 @@ export default class PaperButton extends Focusable {
101101
return this.args.fab || this.args.mini;
102102
}
103103

104+
get bubbles() {
105+
return this.args.bubbles === undefined || this.args.bubbles;
106+
}
107+
104108
@action handleClick(e) {
105109
if (this.args.onClick) {
106110
this.args.onClick(e);
107111
}
108112

109113
// Prevent bubbling, if specified. If undefined, the event will bubble.
110-
if (this.args.bubbles === undefined) {
111-
return true;
114+
if (!this.bubbles) {
115+
e.stopPropagation();
112116
}
113-
114-
return this.args.bubbles;
115117
}
116118

117119
// Proxiable Handlers

0 commit comments

Comments
 (0)