Skip to content

Commit 7043bd1

Browse files
committed
Prevent prompt field focus when using config ID or preset/group selection
1 parent afb16e6 commit 7043bd1

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎apps/editor/src/views/panel/backend/message-handlers/handle-edit-context.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ export const handle_edit_context = async (
376376
return
377377
}
378378

379-
panel_provider.send_message({ command: 'FOCUS_PROMPT_FIELD' })
379+
if (!message.config_id) {
380+
panel_provider.send_message({ command: 'FOCUS_PROMPT_FIELD' })
381+
}
380382

381383
const { provider, config: edit_context_config } = config_result
382384

‎apps/editor/src/views/panel/backend/message-handlers/handle-send-prompt.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,10 @@ export const handle_send_prompt = async (params: {
324324
command: 'SHOW_AUTO_CLOSING_MODAL',
325325
title: 'Opened in the connected browser'
326326
})
327-
params.panel_provider.send_message({ command: 'FOCUS_PROMPT_FIELD' })
327+
328+
if (!params.preset_name && !params.group_name) {
329+
params.panel_provider.send_message({ command: 'FOCUS_PROMPT_FIELD' })
330+
}
328331
}
329332

330333
async function show_preset_quick_pick(params: {

‎apps/editor/src/views/panel/frontend/Home/Home.module.scss‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@
233233
border: none;
234234
border-radius: 20px;
235235
cursor: pointer;
236-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
237236
font-size: 12px;
238237
font-weight: 500;
239238
opacity: 0;

‎apps/editor/src/views/panel/frontend/Home/Home.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ export const Home: React.FC<Props> = (props) => {
334334
</div>
335335
</Scrollable>
336336

337-
{!is_timeline_reached && is_mode_sticky && (
337+
{!is_timeline_reached && (
338338
<button
339339
className={styles['scroll-to-timeline']}
340340
onClick={handle_scroll_to_timeline}

0 commit comments

Comments
 (0)