forked from mbk-lab/rui_orig
2
0
Fork 0

Fixed the focus bug show of popup showing

This commit is contained in:
anoshenko 2021-11-21 18:30:46 +03:00
parent 8a2fd03fac
commit 8439b9fd06
2 changed files with 3 additions and 2 deletions

View File

@ -316,6 +316,8 @@ func (manager *popupManager) showPopup(popup Popup) {
} else { } else {
manager.popups = append(manager.popups, popup) manager.popups = append(manager.popups, popup)
} }
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)
} }

View File

@ -56,11 +56,10 @@ type View interface {
// Return "true" if the value has been set, in the opposite case "false" are returned and // Return "true" if the value has been set, in the opposite case "false" are returned and
// a description of the error is written to the log // a description of the error is written to the log
SetAnimated(tag string, value interface{}, animation Animation) bool SetAnimated(tag string, value interface{}, animation Animation) bool
// SetChangeListener set the function to track the change of the View property
SetChangeListener(tag string, listener func(View, string)) SetChangeListener(tag string, listener func(View, string))
handleCommand(self View, command string, data DataObject) bool handleCommand(self View, command string, data DataObject) bool
//updateEventHandlers()
htmlClass(disabled bool) string htmlClass(disabled bool) string
htmlTag() string htmlTag() string
closeHTMLTag() bool closeHTMLTag() bool