-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui5-dialog): reposition on screen resize (#5283)
A recent change in scroll blocking for the block layer added `overflow: hidden` on the body element, and resizing the browser window in height would not trigger a resize event on the body, and the dialog will not be repositioned. To solve this case, the dialog has been changed to listen to the resize event on the window.
- Loading branch information
Showing
4 changed files
with
89 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,7 +114,7 @@ const metadata = { | |
* @type {string} | ||
* @private | ||
*/ | ||
mediaRange: { | ||
mediaRange: { | ||
type: String, | ||
}, | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
// web component dialog | ||
var wcBtnOpenDialog = document.querySelector('.wcBtnOpenDialog'); | ||
wcBtnOpenDialog.addEventListener('click', function () { | ||
var wcDialog = document.querySelector('.wcDialog'); | ||
wcDialog.show(); | ||
}); | ||
// web component dialog | ||
var wcBtnOpenDialog = document.querySelector('.wcBtnOpenDialog'); | ||
wcBtnOpenDialog.addEventListener('click', function () { | ||
var wcDialog = document.querySelector('.wcDialog'); | ||
wcDialog.show(); | ||
}); | ||
|
||
var wcBtnCloseDialog = document.querySelector('.wcBtnCloseDialog'); | ||
wcBtnCloseDialog.addEventListener('click', function () { | ||
var wcDialog = document.querySelector('.wcDialog'); | ||
wcDialog.close(); | ||
}); | ||
var wcBtnCloseDialog = document.querySelector('.wcBtnCloseDialog'); | ||
wcBtnCloseDialog.addEventListener('click', function () { | ||
var wcDialog = document.querySelector('.wcDialog'); | ||
wcDialog.close(); | ||
}); | ||
|
||
var wcBtnOpenNewDialog = document.querySelector('.wcBtnOpenNewDialog'); | ||
wcBtnOpenNewDialog.addEventListener('click', function () { | ||
var wcNewDialog = document.querySelector('.wcNewDialog'); | ||
wcNewDialog.show(); | ||
}); | ||
var wcBtnOpenNewDialog = document.querySelector('.wcBtnOpenNewDialog'); | ||
wcBtnOpenNewDialog.addEventListener('click', function () { | ||
var wcNewDialog = document.querySelector('.wcNewDialog'); | ||
wcNewDialog.show(); | ||
}); | ||
|
||
var wcBtnOpenNewDialogPopover = document.querySelector('.wcBtnOpenNewDialogPopover'); | ||
wcBtnOpenNewDialogPopover.addEventListener('click', function () { | ||
var wcNewDialogPopover = document.querySelector('.wcNewDialogPopover'); | ||
wcNewDialogPopover.showAt(wcBtnOpenNewDialogPopover); | ||
}); | ||
var wcBtnOpenNewDialogPopover = document.querySelector('.wcBtnOpenNewDialogPopover'); | ||
wcBtnOpenNewDialogPopover.addEventListener('click', function () { | ||
var wcNewDialogPopover = document.querySelector('.wcNewDialogPopover'); | ||
wcNewDialogPopover.showAt(wcBtnOpenNewDialogPopover); | ||
}); | ||
|
||
// web component popover | ||
var wcBtnOpenPopover = document.querySelector('.wcBtnOpenPopover'); | ||
wcBtnOpenPopover.addEventListener('click', function () { | ||
var wcPopover = document.querySelector('.wcPopover'); | ||
wcPopover.showAt(wcBtnOpenPopover); | ||
}); | ||
// web component popover | ||
var wcBtnOpenPopover = document.querySelector('.wcBtnOpenPopover'); | ||
wcBtnOpenPopover.addEventListener('click', function () { | ||
var wcPopover = document.querySelector('.wcPopover'); | ||
wcPopover.showAt(wcBtnOpenPopover); | ||
}); | ||
|
||
var wcBtnClosePopover = document.querySelector('.wcBtnClosePopover'); | ||
wcBtnClosePopover.addEventListener('click', function () { | ||
var wcPopover = document.querySelector('.wcPopover'); | ||
wcPopover.close(); | ||
}); | ||
var wcBtnClosePopover = document.querySelector('.wcBtnClosePopover'); | ||
wcBtnClosePopover.addEventListener('click', function () { | ||
var wcPopover = document.querySelector('.wcPopover'); | ||
wcPopover.close(); | ||
}); | ||
|
||
var wcBtnOpenNewPopover = document.querySelector('.wcBtnOpenNewPopover'); | ||
wcBtnOpenNewPopover.addEventListener('click', function () { | ||
var wcNewPopover = document.querySelector('.wcNewPopover'); | ||
wcNewPopover.showAt(wcBtnOpenNewPopover); | ||
}); | ||
var wcBtnOpenNewPopover = document.querySelector('.wcBtnOpenNewPopover'); | ||
wcBtnOpenNewPopover.addEventListener('click', function () { | ||
var wcNewPopover = document.querySelector('.wcNewPopover'); | ||
wcNewPopover.showAt(wcBtnOpenNewPopover); | ||
}); | ||
|
||
var wcBtnOpenNewPopoverDialog11 = document.querySelector('.wcBtnOpenNewPopoverDialog11'); | ||
wcBtnOpenNewPopoverDialog11.addEventListener('click', function () { | ||
var wcNewPopoverDialog11 = document.querySelector('.wcNewPopoverDialog11'); | ||
wcNewPopoverDialog11.show(); | ||
}); | ||
var wcBtnOpenNewPopoverDialog11 = document.querySelector('.wcBtnOpenNewPopoverDialog11'); | ||
wcBtnOpenNewPopoverDialog11.addEventListener('click', function () { | ||
var wcNewPopoverDialog11 = document.querySelector('.wcNewPopoverDialog11'); | ||
wcNewPopoverDialog11.show(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters