Skip to content

Commit

Permalink
Remove unused changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVelezLl committed May 24, 2024
1 parent 1fdcb5b commit 5f9af58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Changelog is rather internal in nature. See release notes for the public overvie
## Upcoming version 5.x.x (`develop` branch)

- [#590]
- **Description:** Modal now resizes dynamically to adjust size based on content changes.
- **Description:** Modal now shrinks when the content has a smaller height.
- **Products impact:** bugfix.
- **Addresses:** https://github.com/learningequality/kolibri-design-system/issues/570
- **Components:** KModal.
- **Breaking:** No
- **Breaking:** no
- **Impacts a11y:** -
- **Guidance:** Consumers need to ensure the modal content is wrapped correctly for the resizing logic to work effectively. No additional steps required for integration.
- **Guidance:** Consumers need to ensure the modal height is still working correctly.

[#590]: https://github.com/learningequality/kolibri-design-system/pull/590/

Expand Down
3 changes: 2 additions & 1 deletion lib/KModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,14 @@
this.$refs.title.clientHeight -
this.$refs.actions.clientHeight -
32;
// to prevent max height from toggling between pixels
// we set a threshold of how many pixels the height should change before we update
if (Math.abs(maxContentHeightCheck - this.maxContentHeight) >= 8) {
this.maxContentHeight = maxContentHeightCheck;
this.scrollShadow = this.maxContentHeight < this.$refs.content.scrollHeight;
}
// make sure that overflow-y won't be updated to 'auto' if this function is running for the first time
// (otherwise Firefox would add a vertical scrollbar right away) + don't apply if modal contains KSelect
// (otherwise KSelect will be trapped inside modal if KSelect is opened a second time)
Expand All @@ -298,7 +300,6 @@
}
}
}, 50),
emitCancelEvent() {
if (!this.cancelDisabled) {
/**
Expand Down

0 comments on commit 5f9af58

Please sign in to comment.