Skip to content

Commit 200bb5f

Browse files
committed
changeCase method breaks in safari. Use css instead.
1 parent c91e22b commit 200bb5f

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

packages/uui-keyboard-shortcut/lib/uui-key.element.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
22
import { css, html, LitElement } from 'lit';
3-
import { queryAssignedNodes } from 'lit/decorators.js';
43

54
/**
65
* A visual representation of a key on you keyboard. use inside `<uui-keyboard-shortcut></uui-keyboard-shortcut>`
@@ -21,24 +20,13 @@ export class UUIKeyElement extends LitElement {
2120
padding: 5px 7px;
2221
box-sizing: border-box;
2322
user-select: none;
23+
text-transform: lowercase;
2424
}
2525
`,
2626
];
2727

28-
@queryAssignedNodes()
29-
private slotNodes!: NodeList;
30-
31-
private _changeCase() {
32-
if (this.slotNodes !== null) {
33-
this.slotNodes.forEach(node => {
34-
if (node.nodeName === '#text' && node.nodeValue)
35-
node.nodeValue = node.nodeValue?.toLowerCase();
36-
});
37-
}
38-
}
39-
4028
render() {
41-
return html`<slot @slotchange=${this._changeCase}></slot>`;
29+
return html`<slot></slot>`;
4230
}
4331
}
4432

0 commit comments

Comments
 (0)