I am not able to select and copy code from editor

I haven't figured out if it's a bug or if I've done something wrong, but I'm not able to copy all the code I see in the editor, including the main ones in Hype.
Is there any way?

Thanks

This sounds like a bug that I often struggle with: I am unable to copy code or Hype elements, and menu commands don't work either (not even 'save'). The only solution is to close Hype with Cmd-Q (I get the option to save then) and restart Hype. Is that, what you came across?

Yes, same exact thing, but only in terms of copying the code.
I've found that GPT Chat can be a great teacher for me because, although I hate javascript, with GPT Chat I'm learning how it works. He gives me an "interactive" hand because I ask him things and he explains them to me.
The problem though is that I have to copy and paste code from GPT Chat to Hype and vice versa to figure out the errors and I can't get anything done.

Do you just mean the function header stuff like?

// element - DOMHTMLElement that triggered this function being called
// event - event that triggered this function being called
function untitledFunction(hypeDocument, element, event) {

There's not really a way to copy this; we explicitly disallow editing (and selecting) since bad things would happen if it were changed.

It kinda bugs me too though... maybe we can be a bit smarter.

Oh gosh.... we've been trying to track down reliable steps to reproduce this bug for a long time. If you see it again please immediately write down exactly what you were doing before you saw it, and then please shoot support@tumult.com an email. This would be extremely valuable! Thanks!

please immediately write down exactly what you were doing before you saw it

Pious wish... I have no idea when, how, or why this bug occurs. But it just happens... I will do my best..."

1 Like

I came across this bug as well. Hype input “freezes up”. It just behaves similar to when you want to click an element behind a screen that has a mandatory dialog running. My workaround: set the focus to another app. Set the focus back to Hype and that usually solves it. So, there seems to be something going on in an event listener for front most applications.

2 Likes

Thanks - I think it probably has to do with some hidden window or not-quite-closed document that somehow is taking focus in a bad way, but there's some unexpected behavior with that theory and it happens so infrequently that being able to live debug it is tricky.

Please let me know if there are any details from if/when it is hit.

Maybe ..


Where it will copy the visible function. Using a button gives you full control over what goes to the clipboard and does not rely on selection.

You could even have an option in the settings for the buttons behaviour , where it will include the non selectable

// element - DOMHTMLElement that triggered this function being called
// event - event that triggered this function being called
function untitledFunction(hypeDocument, element, event) {

or not.

1 Like

Hi Jonathan,
yes I meant exactly that part of the code:

// element - DOMHTMLElement that triggered this function being called
// event - event that triggered this function being called
function untitledFunction(hypeDocument, element, event) {

The idea of course was not to change that part, but just to make a copy....

1 Like

Oh, I do recall if you don't mind a bit of an extra step, you can go to the Resources Library and control-click or use the edit menu to do "Edit in:" and choose a text editor (like BBEdit). This will open the full source in an external editor that can then be copied.

Anyhow, I filed a feature request about this along with @MarkHunte's suggestion. Thanks!

2 Likes

Thank you!

1 Like