Ghost/apps
Cathy Sarisky ebd98d005a
🐛 fix Windows bug with the admin file upload widget (#21687)
closes #21439

On Windows 10/Chrome (but maybe nowhere else?), attempting to drag a
file into any of the drop targets in the admin panel resulted in
flickering behavior, and generally dropping didn't actually trigger the
upload.

I thought originally it was a problem with the size of the drop target,
but it actually appears to be a rerender bug. In brief, handleDragging
and handleStopDragging were firing repeatedly, and each fire triggered a
rerender, that added or removed a div from the file upload widget.

I suspect some browser-specific difference in how drag events fire is to
blame.

This PR moves the logic to change the classes applied to the div, rather
than changing whether the div is present.

I have manually tested with Windows 10 in the users import, theme
import, and content import widgets. Styles are preserved (although I
think they could be improved, as the grey outline is really faint) and
uploading now works consistently, instead of mostly triggering display
of the raw file most of the time.
2024-11-22 17:21:00 -06:00
..
admin-x-activitypub Connected the endpoint for publishing notes (#21680) 2024-11-21 20:00:01 +00:00
admin-x-demo 🌐 Updated packages for improved i18n support (#21218) 2024-10-03 22:27:16 +00:00
admin-x-design-system 🐛 fix Windows bug with the admin file upload widget (#21687) 2024-11-22 17:21:00 -06:00
admin-x-framework Added author name as an additional check for official themes (#21665) 2024-11-21 12:04:24 +08:00
admin-x-settings 🐛 Fixed Istanbul timezone (#21686) 2024-11-21 17:23:21 +00:00
announcement-bar Added Dev Container setup (#21279) 2024-10-24 11:15:08 -07:00
comments-ui Shipped comments-ui@0.22.4 2024-11-21 18:49:18 +00:00
portal Bumped portal and search packages (#21630) 2024-11-15 19:10:29 +00:00
signup-form Bumped signup form package (#21631) 2024-11-15 19:11:29 +00:00
sodo-search Bumped portal and search packages (#21630) 2024-11-15 19:10:29 +00:00