villebro commented on a change in pull request #15270:
URL: https://github.com/apache/superset/pull/15270#discussion_r656760254



##########
File path: superset-frontend/src/components/EditableTitle/index.tsx
##########
@@ -70,6 +70,13 @@ export default function EditableTitle({
   useEffect(() => {
     if (isEditing) {
       contentRef.current.focus();
+      // move cursor and scroll to the end
+      if (contentRef.current.setSelectionRange) {
+        const { length } = contentRef.current.value;
+        contentRef.current.setSelectionRange(length, length);
+        contentRef.current.scrollLeft = contentRef.current.scrollWidth;
+        contentRef.current.scrollTop = contentRef.current.scrollHeight;

Review comment:
       Not sure if this is needed, but it probably doesn't hurt, either




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to