Skip to content

Commit

Permalink
chore(uve): fix reset contentletArea when scrolling #28947 (#29490)
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinogiardino authored Aug 7, 2024
1 parent 344e6e3 commit f21cafe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,13 @@ describe('UVEStore', () => {

expect(store.state()).toEqual(EDITOR_STATE.OUT_OF_BOUNDS);
});
it('should set the contentletArea to null when we are scrolling', () => {
store.setEditorState(EDITOR_STATE.SCROLLING);

store.updateEditorScrollState();

expect(store.contentletArea()).toBe(null);
});
});

describe('updateEditorOnScrollEnd', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ export function withEditor() {
}

patchState(store, {
state: store.dragItem() ? EDITOR_STATE.SCROLL_DRAG : EDITOR_STATE.SCROLLING
state: store.dragItem() ? EDITOR_STATE.SCROLL_DRAG : EDITOR_STATE.SCROLLING,
contentletArea: null
});
},
updateEditorOnScrollEnd() {
Expand Down

0 comments on commit f21cafe

Please sign in to comment.