MCPcopy Create free account
hub / github.com/error311/FileRise / focusRenameInput

Function focusRenameInput

public/js/fileListView.js:773–787  ·  view source on GitHub ↗
(input, name, selectBase)

Source from the content-addressed store, hash-verified

771}
772
773function focusRenameInput(input, name, selectBase) {
774 try {
775 input.focus();
776 if (selectBase) {
777 const lastDot = String(name || '').lastIndexOf('.');
778 if (lastDot > 0) {
779 input.setSelectionRange(0, lastDot);
780 } else {
781 input.select();
782 }
783 } else {
784 input.select();
785 }
786 } catch (e) { /* ignore */ }
787}
788
789function startInlineRenameForFileRow(row, file, folder) {
790 if (!row || !file) return false;

Callers 3

commitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected