qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.67k stars 3.02k forks source link

The size of the HTML widget #52181

Open MartinMap opened 1 year ago

MartinMap commented 1 year ago

What is the bug or the crash?

The height of the HTML widget takes up significantly more space than necessary. It seems to exponentially increase in size with each additional character. No scrollbars are added.

Smalles form size with html-widget using small text: testlayer - Feature Attributes_002

...using more text: testlayer - Feature Attributes_003

And here a small Test-Project: htmlWidget-test.zip

A small video showing the problem htmlWidget-test.avi

Steps to reproduce the issue

  1. Go to Layer Properties.
  2. Click on the Forms tab
  3. Select the HTML widget
  4. Enter some text into the widget
  5. Check the form in the QGIS Canvas
  6. Add more text and check again

Versions

Supported QGIS version

New profile

Additional context

No response

andreasneumann commented 1 year ago

@MartinMap - is this only for the height or also for the width?

Is it growing "forever" or stopping? Are scrollbars added?

Could you please share a small project demonstrating the issue?

The likelihood to get things fixed grows when you submit a simple project.

github-actions[bot] commented 1 year ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.

MartinMap commented 1 year ago

@MartinMap - is this only for the height or also for the width?

Is it growing "forever" or stopping? Are scrollbars added?

Could you please share a small project demonstrating the issue?

The likelihood to get things fixed grows when you submit a simple project.

I have included all additional information related to my issue, including a video and a demo project.

mki-c2c commented 10 months ago

I was able to reproduce the same bug with QGIS 3.28

the whitespace in the HTML box seems to increase with every space.

As a workaround, you can use   and the size of the box does not increase :-(

johnzet39 commented 6 months ago

I confirm. Each space increases the height of body of the HTMLWidget.

johnzet39 commented 6 months ago

This is not only a space, but also, for example, a slash. The characters used to break the line. And it looks like the widget presets its size in case of future line breaks.