about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/compose/components/text_icon_button.js
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-06-06 13:35:20 -0500
committerStarfall <us@starfall.systems>2022-06-06 13:35:20 -0500
commit78266a002b4735caaef07098ba66419fd71f47c1 (patch)
tree4ba2bc330d5ed4b6a3a926ab9a03a89f56bc8843 /app/javascript/flavours/glitch/features/compose/components/text_icon_button.js
parente9b2e11520056d0ec822ac0862923d00c6a1289c (diff)
parent434b08e95b1a440bf9ae563b72600d1590106260 (diff)
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/components/text_icon_button.js')
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/text_icon_button.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/text_icon_button.js b/app/javascript/flavours/glitch/features/compose/components/text_icon_button.js
index 7f2005060..a35bd4ff5 100644
--- a/app/javascript/flavours/glitch/features/compose/components/text_icon_button.js
+++ b/app/javascript/flavours/glitch/features/compose/components/text_icon_button.js
@@ -17,11 +17,6 @@ export default class TextIconButton extends React.PureComponent {
     ariaControls: PropTypes.string,
   };
 
-  handleClick = (e) => {
-    e.preventDefault();
-    this.props.onClick();
-  }
-
   render () {
     const { label, title, active, ariaControls } = this.props;
 
@@ -31,7 +26,7 @@ export default class TextIconButton extends React.PureComponent {
         aria-label={title}
         className={`text-icon-button ${active ? 'active' : ''}`}
         aria-expanded={active}
-        onClick={this.handleClick}
+        onClick={this.props.onClick}
         aria-controls={ariaControls}
         style={iconStyle}
       >