stopSpaceKeyPropagation method

void stopSpaceKeyPropagation(
  1. KeyboardEvent keyboardEvent
)

Allow typing a space character when the searchbox is used inside another component that assumes space to be an action (such as select).

Implementation

void stopSpaceKeyPropagation(KeyboardEvent keyboardEvent) {
  if (isSpaceKey(keyboardEvent)) {
    keyboardEvent.stopPropagation();
  }
}