add home and end

This commit is contained in:
JesmoDev
2024-06-18 09:44:14 +02:00
committed by Jacob Overgaard
parent 1d769bbfc5
commit 9709718fa3

View File

@@ -238,6 +238,12 @@ export class UmbSplitPanelElement extends LitElement {
this.#setPosition(toPixels);
}
if (event.key === 'Home' || event.key === 'End') {
const { width } = this.mainElement.getBoundingClientRect();
const newPos = event.key === 'Home' ? 0 : width;
this.#setPosition(newPos);
}
}
render() {