Browse Source

Add shortcut to go to header search

Alan Lam 3 năm trước cách đây
mục cha
commit
54a5ae20a1
1 tập tin đã thay đổi với 6 bổ sung và 0 xóa
  1. 6 0
      public/js/app.js

+ 6 - 0
public/js/app.js

@@ -85,4 +85,10 @@ $(() => {
 	}
 
 	toastr.options.positionClass = "toast-bottom-right";
+
+	$(window).on("keyup", event => {
+		if(event.ctrlKey && event.key === "/") {
+			$("#header-search").trigger("focus");
+		}
+	});
 });