shish / shimmie2

An easy-to-install community image gallery (aka booru)
http://code.shishnet.org/shimmie2/
GNU General Public License v2.0
404 stars 112 forks source link

The tag box becomes smaller when you type #1005

Closed Ayutac closed 9 months ago

Ayutac commented 9 months ago

Server Software about: title: "Wandering Inn Fanworks" theme: "twi" url: "https://twifanworks.shelter.moe/"

versions: shimmie: "b1dc9892d5c5d728c631512c16ea19359fd3b35b" schema: 21 php: "8.1.2-1ubuntu2.14" db: "pgsql PostgreSQL 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit" os: "Linux shelterv4 6.5.0-14-generic #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 18:15:30 UTC 2 x86_64" server: "Apache"

extensions: core: ["admin","alias_editor","bbcode","comment","download","et","ext_manager","four_oh_four","handle_pixel","help_pages","image","index","media","mime","setup","static_files","system","tag_edit","tag_list","upgrade","upload","user","user_config","view"] extra: ["autocomplete","emoticons_list","et_server","favorites","graphql","handle_mp3","handle_svg","handle_video","home","image_view_counter","link_image","ouroboros_api","pools","post_titles","random_list","rating","regen_thumb","relationships","report_image","rotate","rss_comments","rss_images","rule34","sitemap","source_history","tag_categories","tag_editcloud","tag_history","tag_tools","tagger_xml","transcode","transcode_video"] handled_mimes: ["image/jpeg","image/gif","image/png","image/webp","audio/mpeg","image/svg+xml","video/x-ms-asf","video/x-msvideo","video/x-flv","video/x-matroska","video/mp4","video/ogg","video/quicktime","video/webm"]

stats: images: 4113 comments: 302 users: 93

media: memory_limit: "500.0MB" disk_use: "510.3GB" disk_total: "687.9GB"

thumbnails: engine: "convert" quality: 75 width: 192 height: 192 scaling: 100 mime: "image/jpeg"

Client Software (please complete the following information)

What steps trigger this bug

  1. Edit any image
  2. Enlarge the tag box
  3. Type any character

What did you expect to happen? The tag box staying the same size.

What actually happened? The tag box becomes smaller.

shish commented 9 months ago

Thanks for the report, this should be fixed in d986d0d3 :)

Ayutac commented 9 months ago
            el.style.height = el.scrollHeight + 'px';
            el.style.width = el.offsetWidth + 'px';

Sure that works? Looks weird to have scrollHeight in one case and offsetWidth in the other. Haven't tested it though.

shish commented 9 months ago

Yup - the scrollHeight will make sure that the textbox is at least as large as the content inside it. However, when changing the height of the element, the width would reset to default (ie, if you made the textbox wider, then it would shrink) - so offsetWidth means it will stay whatever width you manually set it to