Unverified Commit 8f2d5809 authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge pull request #940 from jannikstdl/link-fix

fix: mark text when editing chat titles
parents 6bbc3721 7fe41237
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
let chatTitle = ''; let chatTitle = '';
let showDropdown = false; let showDropdown = false;
let isEditing = false;
onMount(async () => { onMount(async () => {
if (window.innerWidth > 1280) { if (window.innerWidth > 1280) {
...@@ -372,6 +373,7 @@ ...@@ -372,6 +373,7 @@
? 'bg-gray-900' ? 'bg-gray-900'
: ''} transition whitespace-nowrap text-ellipsis" : ''} transition whitespace-nowrap text-ellipsis"
href="/c/{chat.id}" href="/c/{chat.id}"
draggable={isEditing ? 'false' : 'true'}
> >
<div class=" flex self-center flex-1 w-full"> <div class=" flex self-center flex-1 w-full">
<div <div
...@@ -398,6 +400,7 @@ ...@@ -398,6 +400,7 @@
editChatTitle(chat.id, chatTitle); editChatTitle(chat.id, chatTitle);
chatTitleEditId = null; chatTitleEditId = null;
chatTitle = ''; chatTitle = '';
isEditing = false;
}} }}
> >
<svg <svg
...@@ -485,7 +488,7 @@ ...@@ -485,7 +488,7 @@
on:click={() => { on:click={() => {
chatTitle = chat.title; chatTitle = chat.title;
chatTitleEditId = chat.id; chatTitleEditId = chat.id;
// editChatTitle(chat.id, 'a'); isEditing = true;
}} }}
> >
<svg <svg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment