Skip to content

Commit a1cd0a8

Browse files
committed
add comment
1 parent 73390de commit a1cd0a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugins/global-settings/color-schemes/color-scheme-picker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ const ColorSchemePicker = props => {
237237
}
238238

239239
setItemInEdit( prevItem => {
240-
const currentItem = prevItem
240+
// clone deep causes the color picker to jump when dragging, so we use a spread operator to create a new object
241+
const currentItem = { ...prevItem }
241242

242243
if ( ! schemeHasValue( currentItem.colorScheme ) && changeDefaultName ) {
243244
currentItem.name = currentItem?.key === 'scheme-default-1' ? 'Color Scheme 1' : 'Color Scheme 2'

0 commit comments

Comments
 (0)