[GH-ISSUE #602] could not click inputfield #440

Closed
opened 2026-03-04 01:05:02 +03:00 by kerem · 3 comments
Owner

Originally created by @kilosonc on GitHub (May 19, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/602

https://github.com/closetool/mib-browser

could not click the input field OID

environment:

 ██████████████████  ████████     closetool@closetool-redmibook14ii
 ██████████████████  ████████     OS: Manjaro 21.0.4 Ornara
 ██████████████████  ████████     Kernel: x86_64 Linux 5.10.34-1-MANJARO
 ██████████████████  ████████     Uptime: 7h 54m
 ████████            ████████     Packages: 1500
 ████████  ████████  ████████     Shell: zsh 5.8
 ████████  ████████  ████████     Resolution: 1920x1080
 ████████  ████████  ████████     DE: KDE 5.81.0 / Plasma 5.21.4
 ████████  ████████  ████████     WM: KWin
 ████████  ████████  ████████     GTK Theme: Breath [GTK3]
 ████████  ████████  ████████     Icon Theme: breath2
 ████████  ████████  ████████     Disk: 159G / 337G (50%)
 ████████  ████████  ████████     CPU: AMD Ryzen 5 4500U with Radeon Graphics @ 6x 2.375GHz
 ████████  ████████  ████████     GPU: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c3)
                                  RAM: 3609268224-

image

Originally created by @kilosonc on GitHub (May 19, 2021). Original GitHub issue: https://github.com/rivo/tview/issues/602 https://github.com/closetool/mib-browser could not click the input field `OID` environment: ``` ██████████████████ ████████ closetool@closetool-redmibook14ii ██████████████████ ████████ OS: Manjaro 21.0.4 Ornara ██████████████████ ████████ Kernel: x86_64 Linux 5.10.34-1-MANJARO ██████████████████ ████████ Uptime: 7h 54m ████████ ████████ Packages: 1500 ████████ ████████ ████████ Shell: zsh 5.8 ████████ ████████ ████████ Resolution: 1920x1080 ████████ ████████ ████████ DE: KDE 5.81.0 / Plasma 5.21.4 ████████ ████████ ████████ WM: KWin ████████ ████████ ████████ GTK Theme: Breath [GTK3] ████████ ████████ ████████ Icon Theme: breath2 ████████ ████████ ████████ Disk: 159G / 337G (50%) ████████ ████████ ████████ CPU: AMD Ryzen 5 4500U with Radeon Graphics @ 6x 2.375GHz ████████ ████████ ████████ GPU: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c3) RAM: 3609268224- ``` ![image](https://user-images.githubusercontent.com/52988625/118836515-7dfb0300-b8f6-11eb-87cc-aee1cf0bb01f.png)
kerem closed this issue 2026-03-04 01:05:02 +03:00
Author
Owner

@rivo commented on GitHub (May 28, 2021):

Please post a short code snippet that I can run to reproduce this error. Also consider testing with the latest version as from your screenshot, it looks like it may be related to #600.

<!-- gh-comment-id:850585701 --> @rivo commented on GitHub (May 28, 2021): Please post a short code snippet that I can run to reproduce this error. Also consider testing with the latest version as from your screenshot, it looks like it may be related to #600.
Author
Owner

@kilosonc commented on GitHub (May 29, 2021):

@rivo I refered to #600, and it actually fixed the inputfield bug. But I could not chose dropdown item by click.
The code I run

textView := tview.NewTextView()
	oidInput := tview.NewInputField().
		SetLabel("OID").
		SetFieldWidth(30)
	dropDown := tview.NewDropDown().
		SetLabel("Select method: ").
		SetFieldWidth(30).
		SetOptions([]string{"MethodGetRequest", "MethodGetNextRequest", "MethodWalkRequest"}, nil)

	form := tview.NewForm().SetHorizontal(true).AddFormItem(oidInput).AddFormItem(dropDown).AddButton("Send", nil)
	grid := tview.NewGrid().
		SetRows(3, 0).
		SetColumns(30, 0).
		SetBorders(true).
		AddItem(tview.NewTreeView(), 1, 0, 1, 1, 0, 0, true).
		AddItem(form, 0, 0, 1, 2, 0, 0, false).
		AddItem(textView, 1, 1, 1, 1, 0, 0, false)
	app := tview.NewApplication()
	if err := app.EnableMouse(true).SetRoot(grid, true).Run(); err != nil {
		panic(err)
	}

Thanks!

<!-- gh-comment-id:850769735 --> @kilosonc commented on GitHub (May 29, 2021): @rivo I refered to #600, and it actually fixed the inputfield bug. But I could not chose dropdown item by click. The code I run ```go textView := tview.NewTextView() oidInput := tview.NewInputField(). SetLabel("OID"). SetFieldWidth(30) dropDown := tview.NewDropDown(). SetLabel("Select method: "). SetFieldWidth(30). SetOptions([]string{"MethodGetRequest", "MethodGetNextRequest", "MethodWalkRequest"}, nil) form := tview.NewForm().SetHorizontal(true).AddFormItem(oidInput).AddFormItem(dropDown).AddButton("Send", nil) grid := tview.NewGrid(). SetRows(3, 0). SetColumns(30, 0). SetBorders(true). AddItem(tview.NewTreeView(), 1, 0, 1, 1, 0, 0, true). AddItem(form, 0, 0, 1, 2, 0, 0, false). AddItem(textView, 1, 1, 1, 1, 0, 0, false) app := tview.NewApplication() if err := app.EnableMouse(true).SetRoot(grid, true).Run(); err != nil { panic(err) } ``` Thanks!
Author
Owner

@rivo commented on GitHub (May 31, 2021):

Thanks, this helped. The latest commit should fix this.

<!-- gh-comment-id:851402627 --> @rivo commented on GitHub (May 31, 2021): Thanks, this helped. The latest commit should fix this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#440
No description provided.