@momentum-design/components 0.49.3 → 0.49.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,6 +104,7 @@ declare class Buttonsimple extends Buttonsimple_base {
104
104
  * Handles the keydown event on the button.
105
105
  * If the key is 'Enter' or 'Space', the button is pressed.
106
106
  * If the key is 'Enter', the button is pressed. The native HTML button works in the same way.
107
+ * If the key is 'Space', the button's default is prevent to avoid scrolling etc in the host application.
107
108
  *
108
109
  * @param event - The keyboard event.
109
110
  */
@@ -176,6 +176,7 @@ class Buttonsimple extends TabIndexMixin(DisabledMixin(Component)) {
176
176
  * Handles the keydown event on the button.
177
177
  * If the key is 'Enter' or 'Space', the button is pressed.
178
178
  * If the key is 'Enter', the button is pressed. The native HTML button works in the same way.
179
+ * If the key is 'Space', the button's default is prevent to avoid scrolling etc in the host application.
179
180
  *
180
181
  * @param event - The keyboard event.
181
182
  */
@@ -185,6 +186,9 @@ class Buttonsimple extends TabIndexMixin(DisabledMixin(Component)) {
185
186
  if (event.key === 'Enter') {
186
187
  this.triggerClickEvent();
187
188
  }
189
+ if (event.key === ' ') {
190
+ event.preventDefault();
191
+ }
188
192
  }
189
193
  }
190
194
  /**