File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ font-weight: 500;
7575 position: relative;
7676 top: -2px;
7777 }
78+ .contact-section .btn.pressed {
79+ transform: translateY(2px);
80+ box-shadow: 0 0 0 #c0c0c0;
81+ }
7882 .contact-section input:focus {
7983 outline: none;
8084 }
@@ -124,6 +128,21 @@ font-weight: 500;
124128 nameInput?.addEventListener('input', () => handleInput(nameInput));
125129 emailInput?.addEventListener('input', () => handleInput(emailInput));
126130
131+ function submitChat() {
132+ updateChatLink();
133+ chatBtn.classList.add('pressed');
134+ setTimeout(() => {
135+ window.location.href = chatBtn.href;
136+ }, 100);
137+ }
138+
139+ emailInput?.addEventListener('keydown', (e) => {
140+ if (e.key === 'Enter') {
141+ e.preventDefault();
142+ submitChat();
143+ }
144+ });
145+
127146 // Initial resize
128147 resizeInput(nameInput);
129148 resizeInput(emailInput);
You can’t perform that action at this time.
0 commit comments