Skip to content
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

[BUG] EditTextWidget inserts extra space below content #8205

Open
twMat opened this issue May 22, 2024 · 3 comments
Open

[BUG] EditTextWidget inserts extra space below content #8205

twMat opened this issue May 22, 2024 · 3 comments

Comments

@twMat
Copy link
Contributor

twMat commented May 22, 2024

Describe the bug

The EditTextWidget occasionally inserts extra space below its text. The height of the extra space seems proportional to the height of the text.

It's been like this for a long time, probably several years, but I couldn't quite reproduce it. The following instruction seems to reproduce it consistently, at least for me. see below.

Expected behavior

Shrink vertically to fit text (assuming the text is taller than the default empty editor)

To Reproduce

  1. Go to this wiki
  2. Note the table (never mind gibberish in it) and the editwidgets. (For me) they appear properly vertically sized when the wiki is loaded.
  3. Open edit mode... and close again.
  4. Now note how some of the editwidgets now have inserted a lot of empty space beneath their texst!

Screenshots

image

TiddlyWiki Configuration

  • v5.3.3 but also earlier

  • TiddlyHost and local

  • Win 11

  • Brave latest

Additional context

No response

@pmario
Copy link
Contributor

pmario commented May 23, 2024

Put the STYLE definition at the top of the tiddler, then everything works.

The edit-text widget calculates the needed height with the default width and sets a "hardcoded" height. Then the style definition sets the width to 100%. So the height is wrong.

If the style is set in a tiddler tagged $:/tags/Stylesheet or the STYLE tag comes before the height is calculated, everything is fine.

@twMat
Copy link
Contributor Author

twMat commented May 23, 2024

@pmario - Oh, that does avoid the problem. Thank you!

However, that circumvention is not obvious and I'd say it is common practice to put styleblocks at bottom of tiddlers, even if it is not "the proper way" (as noted, I've had the problem for years and I even find it on tiddlywiki.com ) - so maybe the current implementation for setting the editor height is not a good one? With that said... I'd be surprised if anyone would ever resolve this; so I'm closing it.

@twMat twMat closed this as completed May 23, 2024
@Jermolene
Copy link
Owner

Hi @twMat I'm inclined to keep this open, it is a clear description of a definite problem with the autoresize code, and it would be nice to fix it.

@Jermolene Jermolene reopened this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants