Skip to content

Question regarding PopupAutocomplete behaviour #4481

@IamSanjid

Description

@IamSanjid

Currently the PopupAutocomplete:

protected void Close ()
{
ClearSuggestions ();
Visible = false;
_closed = true;
//RemovePopupFromTop ();
_popup.Visible = false;
HostControl?.SetNeedsDraw ();
}

Always seem to set _popup.Visible = false; on Close.

In the TextField context, if the user is clearing current word this becomes an issue.

The RenderOverlay calls Close:

else if (!Visible || HostControl?.HasFocus == false || Suggestions.Count == 0)
{
LastPopupPos = null;
if (Visible)
{
Close ();
}

whenever the Suggestions.Count becomes 0, so when the user is clearing current word the _popup.Visible becomes false and nothing makes it true unless Reopen key is pressed.

Is this supposed to happen? Should we set the _popup.Visible = true whenever we try to render the suggestoins?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions