forked from mbk-lab/rui_orig
Bug fixing
This commit is contained in:
parent
5b545acbd1
commit
b43bf80856
13
editView.go
13
editView.go
|
@ -491,23 +491,30 @@ func (edit *editViewData) htmlProperties(self View, buffer *strings.Builder) {
|
|||
buffer.WriteByte('"')
|
||||
}
|
||||
|
||||
convertText := func(text string) string {
|
||||
if strings.ContainsRune(text, '"') {
|
||||
text = strings.ReplaceAll(text, `"`, `"`)
|
||||
}
|
||||
return textToJS(text)
|
||||
}
|
||||
|
||||
if hint := GetHint(edit, ""); hint != "" {
|
||||
buffer.WriteString(` placeholder="`)
|
||||
buffer.WriteString(textToJS(hint))
|
||||
buffer.WriteString(convertText(hint))
|
||||
buffer.WriteByte('"')
|
||||
}
|
||||
|
||||
buffer.WriteString(` oninput="editViewInputEvent(this)"`)
|
||||
if pattern := GetEditViewPattern(edit, ""); pattern != "" {
|
||||
buffer.WriteString(` pattern="`)
|
||||
buffer.WriteString(textToJS(pattern))
|
||||
buffer.WriteString(convertText(pattern))
|
||||
buffer.WriteByte('"')
|
||||
}
|
||||
|
||||
if editType != MultiLineText {
|
||||
if text := GetText(edit, ""); text != "" {
|
||||
buffer.WriteString(` value="`)
|
||||
buffer.WriteString(textToJS(text))
|
||||
buffer.WriteString(convertText(text))
|
||||
buffer.WriteByte('"')
|
||||
}
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ func (tabsLayout *tabsLayoutData) set(tag string, value interface{}) bool {
|
|||
updateInnerHTML(htmlID, tabsLayout.session)
|
||||
}
|
||||
|
||||
case TabStyle, CurrentTabStyle:
|
||||
case TabStyle, CurrentTabStyle, TabBarStyle:
|
||||
if text, ok := value.(string); ok {
|
||||
if text == "" {
|
||||
delete(tabsLayout.properties, tag)
|
||||
|
|
Loading…
Reference in New Issue