How to use the @ui5/webcomponents-base/src/events/PseudoEvents.js.isSpace function in @ui5/webcomponents-base

To help you get started, we’ve selected a few @ui5/webcomponents-base examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / ui5-webcomponents / packages / main / src / ShellBar.js View on Github external
onkeydown(event) {
		if (isEscape(event)) {
			return this._handleEscape(event);
		}

		if (isSpace(event)) {
			event.preventDefault();
		}
	}
github SAP / ui5-webcomponents / packages / main / src / Icon.js View on Github external
onkeyup(event) {
		if (isSpace(event) && this.__spaceDown) {
			this.fireEvent("press");
			this.__spaceDown = false;
		}
	}
github SAP / ui5-webcomponents / packages / main / src / Panel.js View on Github external
onkeyup(event) {
		const headerUsed = this._headerOnTarget(event.ui5target);

		if (isSpace(event) && headerUsed) {
			this._toggleOpen();
		}
	}
github SAP / ui5-webcomponents / packages / main / src / Icon.js View on Github external
onkeydown(event) {
		if (isSpace(event)) {
			event.preventDefault();
			this.__spaceDown = true;
		} else if (isEnter(event)) {
			this.onclick(event);
		}
	}
github SAP / ui5-webcomponents / packages / main / src / Panel.js View on Github external
onkeydown(event) {
		const headerUsed = this._headerOnTarget(event.ui5target);

		if (isEnter(event) && headerUsed) {
			this._toggleOpen();
		}

		if (isSpace(event) && headerUsed) {
			event.preventDefault();
		}
	}
github SAP / ui5-webcomponents / packages / main / src / Token.js View on Github external
_keydown(event) {
		const isBS = isBackSpace(event);
		const isD = isDelete(event);

		if (!this.readonly && (isBS || isD)) {
			event.preventDefault();

			this.fireEvent("delete", {
				backSpace: isBS,
				"delete": isD,
			});
		}

		if (isEnter(event) || isSpace(event)) {
			this.fireEvent("select", {});
		}
	}

@ui5/webcomponents-base

UI5 Web Components: webcomponents.base

Apache-2.0
Latest version published 5 days ago

Package Health Score

90 / 100
Full package analysis