forked from mbk-lab/rui_orig
2
0
Fork 0

Fixed Popup

This commit is contained in:
Alexei Anoshenko 2022-07-09 13:45:10 +03:00
parent b860295325
commit 21ee77eb26
1 changed files with 2 additions and 0 deletions

View File

@ -362,6 +362,7 @@ func (manager *popupManager) showPopup(popup Popup) {
session.runScript(`if (document.activeElement != document.body) document.activeElement.blur();`) session.runScript(`if (document.activeElement != document.body) document.activeElement.blur();`)
manager.updatePopupLayerInnerHTML(session) manager.updatePopupLayerInnerHTML(session)
updateCSSProperty("ruiPopupLayer", "visibility", "visible", session) updateCSSProperty("ruiPopupLayer", "visibility", "visible", session)
updateCSSProperty("ruiRoot", "pointer-events", "none", session)
} }
func (manager *popupManager) dismissPopup(popup Popup) { func (manager *popupManager) dismissPopup(popup Popup) {
@ -379,6 +380,7 @@ func (manager *popupManager) dismissPopup(popup Popup) {
if manager.popups[count-1] == popup { if manager.popups[count-1] == popup {
if count == 1 { if count == 1 {
manager.popups = []Popup{} manager.popups = []Popup{}
updateCSSProperty("ruiRoot", "pointer-events", "auto", session)
updateCSSProperty("ruiPopupLayer", "visibility", "hidden", session) updateCSSProperty("ruiPopupLayer", "visibility", "hidden", session)
session.runScript(`updateInnerHTML('ruiPopupLayer', '');`) session.runScript(`updateInnerHTML('ruiPopupLayer', '');`)
} else { } else {