-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultilineInput - Not sized properly when workspace is loaded. #6071
Comments
Hi, I'm not able to reproduce this. Can you provide more detailed reproduction steps? How are you clearing and reloading the workspace? Thanks! |
This is the code to reproduce the bug. Please review and let us know if you need any more details. `blocklyWorkspace.clear(); var workspaceJSONValue = Blockly.serialization.workspaces.load(workspaceJSONValue, blocklyWorkspace);` |
Is there a workaround for now? I am having the same issue. |
Hi Blockly team Even we are facing the same issue in our environment, any plans as to when this fix can be provided or do we any work around for the same. |
I've encountered this on Windows 10 using Chrome 104.0.5112.102, Firefox 104.0.1, and Edge 104.0.1293.70. The reason is that re: bugzilla "SVGTextElement.getComputedTextLength() returns 0 if element not rendered" and "SVG display:none rules" To work around, i derived my own class based on I don't know what the actual correct fix is though. [ eta ] using only changing the line from seems to keep the initial text looking good while also keeping the editor wrapping right. |
Thank you @ionous this fixed my problem. In my case dom of dom.getFastTextWidth was undefined so the solution is to use Blockly.utils.dom.getFastTextWidth which is the alias given in the documentation. |
Fixed by #6461 |
Hi Team,
As shown in the below screenshots, when the Workspace is cleared and loaded
Multiline block is not sized properly to show all the text within the block as seen in Image1.
But, if we try to edit the block the multiline block is resized to accommodate the text as seen in Image 2. Also, afterwards it retains the size.
Image 1:
Image 2:
Any help is much appreciated.
Thanks,
Shweta
The text was updated successfully, but these errors were encountered: