-
Notifications
You must be signed in to change notification settings - Fork 63
[BUG] input_field.py: AssertionError: assert self._drag_start is not None #75
Copy link
Copy link
Closed
Labels
BugSomething isn't workingSomething isn't working
Description
Describe the bug
- I got this error when I focus on an
InputField, then drag theContainerborder (box) of anotherInputField. This error happens when I wrap theInputFieldwith theContainerwidget. - I have tested most types of boxes and still see this error, except the
EMPTYbox type. - This error only happens when I focus (click the area inside the Container border) on the first
InputFieldand then drag the border (box) of the secondInputField. Note that it won't happen when I focus on the firstInputFieldand then focus on the secondInputField. - It's strange that this error doesn't happen when I tested it on Replit 🤔, it only happens in my local environment. You can copy the snippet code below and test it on Replit.
To Reproduce
Steps to reproduce the behavior:
- You can copy the snippet code below:
import pytermgui as ptg
with ptg.WindowManager() as manager:
ptg.boxes.ROUNDED.set_chars_of(ptg.Container)
window = ptg.Window(
ptg.Label("Email"),
ptg.Container(ptg.InputField()),
ptg.Label("Password"),
ptg.Container(ptg.InputField()),
)
window.vertical_align = ptg.VerticalAlignment.TOP
manager.add(window)
manager.run()NOTE: The
Labelwidget is just for separating theInputField, you can remove it.
- Run the program.
- Click your mouse on the
InputFieldbelow the "Email" label. NOTE: area inside theContainerborder, not the border. - Then use your mouse drag down (or up/left/right) the bottom (or top/left/right) border of the
InputFieldbelow the "Password" label. NOTE: drag the border, not the area inside theContainerborder. - See error.
Expected behavior
Nothing happens, because I just drag the border.
System information
PyTermGUI version 6.4.0
System details:
Python version: 3.10.4
$TERM: xterm-256color
$COLORTERM: truecolor
Color support: ColorSystem.TRUE
OS Platform: Linux-5.15.0-40-generic-x86_64-with-glibc2.35
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working
