Conversation
Reducing the size of nonfit textbox was broken - possibly due changes upstream. The fixed height of textbox is required for other section of the code to work correctly, however it broke reducing size here. By setting the textbox height to `auto` before calculating `scrollHeight`, the true height can once again be established - original height willl be reset after change. Furthermore, this commit also changes the `<=` to `<` in the limiting condition - to allow one-directional resize. However there are still weird issues for rotated textboxes when hitting the minimum size, but that have probably existed for some time.
|
This fixes #3199 for me at first glance. Will test it a bit more though.
Do you mean this? https://cloudup.com/cXICc_z3pah |
Exactly that. Equally, but differently, weird at all angles. |
|
This might be related, WordPress/gutenberg#17011 . Upstream package was updated. This might have effected something here. |
Hmm this should be caught in the text block's edit component's amp-wp/assets/src/stories-editor/blocks/amp-story-text/edit.js Lines 70 to 79 in 93276f7 amp-wp/assets/src/stories-editor/helpers/index.js Lines 1262 to 1315 in 93276f7 Perhaps it needs the same |
|
@swissspidy Should this be part of this PR or another one? Is it related? |
|
Semi-related, but can be looked at in a separate PR. |
* tag '1.3.0': (318 commits) Bump 1.3.0 Add inline styles for custom fonts (#3345) Limit deeply-nesting test to 200 to fix Xdebug error (#3341) Bump 1.3-RC2 (#3335) Sanitize invalid children of amp-story and amp-story-page elements to prevent white story of death (#3336) Remove unused Travis deploy stage (#3340) Implement automated accessibility testing using Axe (#3294) Only add all Google Font style rules in editor context Prevent adding AMP query var to Story URLs in Compatibility Tool Prevent attempting to redirect Stories with rejected validation errors Ensure all AMP scripts (including v0.js) get moved to the head Make sure that media picker is background types are filter correctly. Normalize style[type] attribute quote style after r46164 in WP core Fix phpunit covers tags Bump version to 1.3-RC1 Strip 100% width/height from layout=fill elements Fix issue with cut (#3246) Remove unused Google Fonts SVGs (#3289) Fix resize for non-fit text box (#3259) Use template_dir consistently as signal for transitional mode ...

Fixes #3199.
Reducing the size of non-fit text box was broken recently - possibly due changes upstream. The fixed height of text box is required for other section of the code to work correctly, however it broke reducing size here.
By setting the text box height to
autobefore calculatingscrollHeight, the true height can once again be established - original height will be reset after change.Furthermore, this commit also changes the
<=to<in the limiting condition - to allow one-directional resize.However there are still weird issues for rotated text boxes when hitting the minimum size, but that have probably existed for some time.
Please note, if you are reviewing this, play around with both fitted and non-fitted text boxes as well as other types of elements and try to resize them both larger and smaller in all directions. Furthermore, do this when rotated as well.