-
Notifications
You must be signed in to change notification settings - Fork 217
Description
when you click inside one of the branch value textboxes on the summary tab (not on the branches tab), and hit Ctrl+A to select all, it doesn't select all inside the textbox, but selects all on the whole page. (see screenshot in thread.)
so if you want to copy the branch value, you have to manually click + drag to create a selection, which is very annoying when the branch value is long (as is always the case for messaging experiments).
and this is aggravated by the branches tab being disabled for launched experiments. the branches tab doesn't have this problem, as its textboxes behave more like true textareas (though they are still divs, I assume we're using a library like CodeMirror). I guess the Ctrl+A behavior is dictated by the contenteditable attribute.
if we were using real textareas, the attribute would be readonly. when readonly=true, the textarea content can't be edited, but it can still be selected, and when you hit Ctrl+A, the selection stays within the textarea. so I think that's what the read-only code editors should be emulating. since they're not real textareas, this might have to be implemented from scratch, but if we're using a library maybe it already has a prop for this.
otherwise, the problem could also be solved by putting a copy button inside the code editors, perhaps floating in the top right corner. the only context in which I've run into this problem is when I'm trying to copy the branch value, so if the root cause can't easily be fixed, this could be the way to go.
┆Issue is synchronized with this Jira Task