TextField widget allows horizontal resize instead of vertical
See original GitHub issueFound a bug? Please fill out the sections below. 👍
Issue Summary
The admin widget for TextField
allows vertical resize instead of vertical.
Steps to Reproduce
- Setup the Wagtail Bakerydemo (e.g. with https://github.com/wagtail/docker-wagtail-develop)
- Navigate to the “Gallery” page (ID = 70) – http://localhost:8000/admin/pages/70/edit/.
- Try to resize the “Introduction” field
- Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?
Instead of the horizontal resizing I would expect to be able to vertically resize.
Inspecting the field, you will find: style="overflow: hidden; overflow-wrap: break-word; resize: horizontal; height: 75px;"
Manually changing the resize: horizontal
to resize: vertical
creates the expected behaviour.
- I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: (yes /
no)
Technical details
- Python version: Run
python --version
. -> Python 3.7.10 - Django version: Look in your requirements.txt, or run
pip show django | grep Version
. -> Django 3.1.11 - Wagtail version: Look at the bottom of the Settings menu in the Wagtail admin, or run
pip show wagtail | grep Version:
. ->master
- Browser version: You can use https://www.whatsmybrowser.org/ to find this out. – Firefox 88 (macOS)
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
How to change TextField's height and width? - Stack Overflow
yes I can update the height/fontSize attributes but there is default padding within the TextField which adds up for extra height & width,...
Read more >3 Ways to Set Height and Width of TextField in Flutter [2022]
Let's learn the easiest way to set height and width of TextField in Flutter. We'll see all the different approaches.
Read more >resize - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The element displays a mechanism for allowing the user to resize it, which may be resized both horizontally and vertically. horizontal.
Read more >SizedBox class - widgets library - Flutter - Dart API docs
A box with a specified size. If given a child, this widget forces it to have a specific width and/or height. These values...
Read more >Layout Management | Qt Widgets 6.4.1 - Qt Documentation
Manages forms of input widgets and their associated labels. QGraphicsAnchor ... Layout attribute describing horizontal and vertical resizing policy.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a temporary workaround
And pass
rows=0
to yourField
orBlock
. Wagtail sets the default to 1 which negates the hole idea of auto resize.@gasman personally I’m happy with either allowing both directions of manual resizing (what I’ve merged) or none (your PR).
The point in allowing vertical resizing in addition to horizontal is that people can make a field narrower as needed, and also change the height of the field so they can still see the whole content, without having to press “Enter” in the field to let the auto-size kick in. Preventing the auto-size logic from kicking in when the field is already big enough would be nice but certainly not a blocker to supporting this.