Bug: code-editor fields show no preview

If there is a property field which does only take direct code (eg. the Count-property of a DataGrid) it happens from time to time that the fields seems to be empty, until you click into it, then it reveals its contents.

I saw similiar issues in Postman, they had textboxes which didn't show content until you would click into it. They solved the problem through a workaround, a little colored dot near the textbox, if it was rendered the user knew there was some hidden content in the textbox nearby.

I assume this problem isn't handmade by your team of devs but one of the underlying electron framework bugs. But if it looks like the bug won't be fixed in near future you maybe wanna think about a similar workaround like Postman did?

We have seen this issue appear sometimes but cannot predictably determine what is causing it. There is a chance this isn't an Electron bug but an issue with the way we are using the code editor component. We will investigate the matter further.

I noticed another behaviour which might have something to do with it.

  1. Add a grid to an empty page
  2. Add a column and open the code-editor of the template property
  3. Now you see an empty page on which you can place a button
  4. Add a button and leave the editor 'End template editing'
  5. Go back to the property and 'Edit template' again
  6. Now you are back in the code-editor, the button seems to be gone
  7. But it isn't, you have to scroll up to see it, because ... dunno ... your viewport isn't set to 0/0 !?

First: Can you reproduce this?
Second: So my theory is we do not see the content of the textfield because we are not seeing the top-left content of the stuff which gets rendered in the box. By clicking on it the viewport moves and we can see the content.

Yes, the scroll position needs to reset when going in template edit mode. We will take care of that.

So my theory is we do not see the content of the textfield because we are not seeing the top-left content of the stuff which gets rendered in the box. By clicking on it the viewport moves and we can see the content.

Oh I see what you mean. We will check if this isn't the case and the code editor "remembers" its old size.

The scrollbar is now reset. I cannot reproduce the other issue predictably though - I confirm that I have seen it on a few occasions. Is there any way that you make it happen every time?

1 Like

I thought my STR are stable but unfortunately I just tried them out again and I cannot reproduce :frowning:
But I will add something to this thread if I should see it again after your fix is out.