diff --git a/frontend/src/utils/form/datepicker.js b/frontend/src/utils/form/datepicker.js index a63a974b4..ec6540cc8 100644 --- a/frontend/src/utils/form/datepicker.js +++ b/frontend/src/utils/form/datepicker.js @@ -2,8 +2,6 @@ import datetime from 'tail.datetime'; import { Utility } from '../../core/utility'; import moment from 'moment'; -const DP_SCROLL_TARGET_CLASS = 'datepicker--scroll-target'; - const KEYCODE_ESCAPE = 27; const Z_INDEX_MODAL = 9999; @@ -187,15 +185,6 @@ export class Datepicker { // format the date value of the form input element of this datepicker before form submission this._element.form.addEventListener('submit', () => this.formatElementValue()); - - // manually reposition the datepicker element on scroll change of its next scroll target - const scrollTargetNode = this.datepickerInstance.dt.closest(DP_SCROLL_TARGET_CLASS); - if (scrollTargetNode) { - scrollTargetNode.addEventListener('scroll', () => { - this.datepickerInstance.dt.style.scrollLeft = `${scrollTargetNode.scrollLeft}px`; - this.datepickerInstance.dt.style.scrollTop = `${scrollTargetNode.scrollTop }px`; - }); - } } destroy() { diff --git a/frontend/src/utils/modal/modal.js b/frontend/src/utils/modal/modal.js index dfae0a460..3958d6c2c 100644 --- a/frontend/src/utils/modal/modal.js +++ b/frontend/src/utils/modal/modal.js @@ -23,8 +23,6 @@ const MODALS_WRAPPER_CLASS = 'modals-wrapper'; const MODALS_WRAPPER_SELECTOR = '.' + MODALS_WRAPPER_CLASS; const MODALS_WRAPPER_OPEN_CLASS = 'modals-wrapper--open'; -const DP_SCROLL_TARGET_CLASS = 'datepicker--scroll-target'; - @Utility({ selector: '[uw-modal]', }) @@ -130,7 +128,7 @@ export class Modal { } _open() { - this._element.classList.add(MODAL_OPEN_CLASS, DP_SCROLL_TARGET_CLASS); + this._element.classList.add(MODAL_OPEN_CLASS); this._modalOverlay.classList.add(MODAL_OVERLAY_OPEN_CLASS); this._modalsWrapper.classList.add(MODALS_WRAPPER_OPEN_CLASS); this._modalsWrapper.appendChild(this._element); diff --git a/frontend/src/utils/modal/modal.scss b/frontend/src/utils/modal/modal.scss index 50054aaaf..e9cd70494 100644 --- a/frontend/src/utils/modal/modal.scss +++ b/frontend/src/utils/modal/modal.scss @@ -27,7 +27,6 @@ border-radius: 2px; z-index: -1; color: var(--color-font); - padding: 0 40px; overflow: auto; overscroll-behavior: contain; pointer-events: none; @@ -114,6 +113,6 @@ div.modal__trigger { } .modal__content { - margin: 20px 0; + margin: 20px 40px; width: 100%; } diff --git a/package-lock.json b/package-lock.json index 6b03a7be3..353adfe1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15317,7 +15317,7 @@ } }, "tail.datetime": { - "version": "git+https://github.com/uni2work/tail.DateTime.git#d3256920fcedbf32c84b8065e77628097c7f2410", + "version": "git+https://github.com/uni2work/tail.DateTime.git#57e4feb2d6a53c7e1d3630a2da7eb9a213fa288d", "from": "git+https://github.com/uni2work/tail.DateTime.git#master" }, "tapable": { diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index b77845c40..cdcffaad5 100644 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -11,7 +11,7 @@ $if not isModal