Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

🐛 Fixed gallery image changing order randomly when dropped on itself #1081

Conversation

kevinansfield
Copy link
Member

no issue

  • clear the cached insertIndex when hiding the drop position indicator
  • update the gallery card's _isDropAllowed function to return false if the droppabeIndex (insertIndex) doesn't exist

no issue
- clear the cached `insertIndex` when hiding the drop position indicator
- update the gallery card's `_isDropAllowed` function to return `false` if the `droppabeIndex` (`insertIndex`) doesn't exist
@kevinansfield kevinansfield merged commit 7d0266e into TryGhost:master Dec 11, 2018
@kevinansfield kevinansfield deleted the fix-gallery-reorder-when-dropped-on-self branch December 11, 2018 12:13
@coveralls
Copy link

Coverage Status

Coverage remained the same at 71.34% when pulling b642e58 on kevinansfield:fix-gallery-reorder-when-dropped-on-self into cd99ded on TryGhost:master.

kevinansfield added a commit that referenced this pull request Dec 11, 2018
no issue
- #1081 introduced a bug where the `insertIndex` was being cleared every time we showed the drop position indicator because we hide the indicator as a reset every time we show the indicator. This meant every drop was missing the required insertIndex.
- added a flag to the `_hideDropIndicator` function so that a reset when showing the indicator doesn't clear the required information
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants