-
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
RTL input field alignment is off #6976
Comments
bisect says #6702 is the culprit. still looking into why this would matter only on RTL |
This happens because we need to position the WidgetDiv (the HTMLTextInput) after the block is done rendering, which now happens on a delay due to the render queuing system. So you can fix the issue by waiting until the render is done like so (in field_input): private onHtmlInputChange_(_e: Event) {
this.setValue(this.getValueFromEditorText_(this.htmlInput_!.value));
requestAnimationFrame(() => {setTimeout(() => {
this.resizeEditor_();
}, 0);
}); What I don't know is why you actually need to wait, since Also, this isn't the first issue caused by the general problem of needing to do additional rendering work after a block is rendered. So we might want to design a more elegant solution to that instead of just throwing more |
As for why the position values are different when doing it during render vs after, they are different all the way to the getBoundingClientRect call inside getScaledBbox I am not sure if this is because the Anyway gonna hold off on this further until we decide what to do about the broader issue. |
Check for duplicates
Description
See screenshot below. In RTL mode only fields are misaligned. I see this is true in the multi_playground going back to at least blockly-v9.2.1
Reproduction steps
Stack trace
No response
Screenshots
Browsers
No response
The text was updated successfully, but these errors were encountered: