Skip to content

Commit 364cc67

Browse files
remove black line arond canvas
Signed-off-by: NikitaSkrynnik <[email protected]>
1 parent bd2d49e commit 364cc67

File tree

6 files changed

+5
-15
lines changed

6 files changed

+5
-15
lines changed

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "huly-browser"
33
version = "0.3.4"
4-
description = "A Tauri App"
4+
description = "Huly Browser"
55
authors = ["you"]
66
edition = "2024"
77

src/components/Browser.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
.canvas {
66
display: block;
7+
outline: none;
78
}
89

910
.fps-counter {

src/components/Browser.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,7 @@ class InputHandler {
124124

125125
canvas.onkeydown = (e) => {
126126
if (app.shortcuts.checkShortcutConflict(e)) return;
127-
128-
if (e.key === "Tab") {
129-
e.preventDefault();
130-
}
127+
if (e.key === "Tab") e.preventDefault();
131128

132129
const keyCode = domCodeToKeyCode(e.code);
133130
if (keyCode !== undefined) {
@@ -140,10 +137,7 @@ class InputHandler {
140137
}
141138
canvas.onkeyup = (e) => {
142139
if (app.shortcuts.checkShortcutConflict(e)) return;
143-
144-
if (e.key === "Tab") {
145-
e.preventDefault();
146-
}
140+
if (e.key === "Tab") e.preventDefault();
147141

148142
const keyCode = domCodeToKeyCode(e.code);
149143
if (keyCode !== undefined) {

src/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
/* @refresh reload */
22
import { render } from "solid-js/web";
33
import App from "./App";
4-
import { setConfig } from "cef-client";
54

65
if (!import.meta.env.DEV) {
76
document.oncontextmenu = (event) => {
87
event.preventDefault()
98
}
109
}
1110

12-
setConfig({ logging: false, defaultUrl: "huly://newtab" })
13-
1411
render(() => <App />, document.getElementById("root") as HTMLElement);

src/state/shortcuts.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ export class Shortcuts {
1515

1616
constructor(app: AppState) {
1717
window.addEventListener("keydown", (e) => {
18-
console.log("event: ", e);
1918
let shortcut = this.eventToShortcut(e);
20-
console.log("got shortcut", shortcut);
2119

2220
if (this.shortcuts.has(shortcut)) {
2321
let action = this.actions.get(this.shortcuts.get(shortcut) ?? "");

src/state/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export class AppState {
267267

268268
private processSearchString(searchString: string) {
269269
let is1 = isFQDN(searchString);
270-
let is2 = isURL(searchString, { protocols: ["http", "https", "huly"], require_tld: false });
270+
let is2 = isURL(searchString, { protocols: ["http", "https", "huly", "file"], require_tld: false, require_host: false });
271271

272272
if (is1 || is2) {
273273
return searchString;

0 commit comments

Comments
 (0)