mirror of
https://github.com/rivo/tview.git
synced 2024-11-11 01:10:41 +00:00
Focus on text area in input field will trigger input field's focus callback. #1020
This commit is contained in:
parent
fd649dbf12
commit
520ccd71f0
@ -135,6 +135,11 @@ func NewInputField() *InputField {
|
||||
if i.changed != nil {
|
||||
i.changed(i.textArea.GetText())
|
||||
}
|
||||
}).SetFocusFunc(func() {
|
||||
// Forward focus event to the input field.
|
||||
if i.Box.focus != nil {
|
||||
i.Box.focus()
|
||||
}
|
||||
})
|
||||
i.textArea.textStyle = tcell.StyleDefault.Background(Styles.ContrastBackgroundColor).Foreground(Styles.PrimaryTextColor)
|
||||
i.textArea.placeholderStyle = tcell.StyleDefault.Background(Styles.ContrastBackgroundColor).Foreground(Styles.ContrastSecondaryTextColor)
|
||||
|
Loading…
Reference in New Issue
Block a user