mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
ebd98d005a
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. |
||
---|---|---|
.. | ||
.storybook | ||
src | ||
test | ||
.eslintrc.cjs | ||
.gitignore | ||
package.json | ||
postcss.config.cjs | ||
preflight.css | ||
README.md | ||
styles.css | ||
tailwind.cjs | ||
tailwind.config.cjs | ||
tsconfig.declaration.json | ||
tsconfig.json | ||
tsconfig.node.json | ||
vite.config.ts |
Admin X Design
Components, design guidelines and documentation for building apps in Ghost Admin
Usage
Develop
This is a monorepo package.
Follow the instructions for the top-level repo.
git clone
this repo &cd
into it as usual- Run
yarn
to install top-level dependencies.
Test
yarn lint
run just eslintyarn test
run lint and tests