Skip to content

Commit a4e547d

Browse files
ui(server): fix console searchbar z-index (pterodactyl#4587)
1 parent 1bb1b13 commit a4e547d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

resources/scripts/components/server/console/Console.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ export default () => {
6666
const isTransferring = ServerContext.useStoreState((state) => state.server.data!.isTransferring);
6767
const [history, setHistory] = usePersistedState<string[]>(`${serverId}:command_history`, []);
6868
const [historyIndex, setHistoryIndex] = useState(-1);
69+
// SearchBarAddon has hardcoded z-index: 999 :(
70+
const zIndex = `
71+
.xterm-search-bar__addon {
72+
z-index: 10;
73+
}`;
6974

7075
const handleConsoleOutput = (line: string, prelude = false) =>
7176
terminal.writeln((prelude ? TERMINAL_PRELUDE : '') + line.replace(/(?:\r\n|\r|\n)$/im, '') + '\u001b[0m');
@@ -126,6 +131,7 @@ export default () => {
126131

127132
terminal.open(ref.current);
128133
fitAddon.fit();
134+
searchBar.addNewStyle(zIndex);
129135

130136
// Add support for capturing keys
131137
terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => {

0 commit comments

Comments
 (0)