0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/apps/admin-x-design-system/src
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
..
assets Custom fonts (#21337) 2024-10-24 07:43:08 -04:00
docs Admin X Design System docs (#19120) 2023-11-23 16:18:59 +01:00
global 🐛 fix Windows bug with the admin file upload widget (#21687) 2024-11-22 17:21:00 -06:00
hooks Fixed treeshaking for lodash in AdminX apps 2024-09-03 10:18:04 +02:00
providers 🐛 Fixed dark mode for standalone html editors in Admin X (#20689) 2024-07-30 09:18:51 -05:00
settings Updated tips & donations default suggested value 2024-08-20 12:07:51 +01:00
utils 🐛 Fixed navigations links for Ghost sites hosted on a subdirectory (#21071) 2024-09-23 18:37:05 +02:00
Boilerplate.stories.tsx Fundamental page components (#19037) 2023-11-21 06:49:41 +00:00
Boilerplate.tsx
DesignSystemApp.tsx 🐛 Fixed dark mode for standalone html editors in Admin X (#20689) 2024-07-30 09:18:51 -05:00
index.ts 🐛 Fixed navigations links for Ghost sites hosted on a subdirectory (#21071) 2024-09-23 18:37:05 +02:00
typings.d.ts