Skip to content
This repository was archived by the owner on Aug 9, 2024. It is now read-only.
This repository was archived by the owner on Aug 9, 2024. It is now read-only.

RightButtons/LeftButtons on TextFields briefly disappear and reappear on click when ShowMode="Focus" #1223

Closed

Description

@fabriciomurta

Forum thread: TextField is unfocused when right button is clicked.

Whenever the right/left button is clicked, it makes the field briefly lose and get focus back, which hides and shows back the button.

Activity

  1. fabriciomurta commented on Jan 13, 2016

    @fabriciomurta
    Author

    The problem is within an Ext.form.field.Text and it is related to a feature (right/left buttons) specific to Ext.NET.

    The following override makes the button stop hiding, but is forcing focus back to the field. This odd re-focus is happening even without the override.

        <script>
            Ext.override(Ext.form.field.Text, {
                postBlur: function () {
                    this.callSuper(arguments);
    
                    var componentId = this.id;
    
                    // Do not hide it if the button clicked is inside the textfield.
                    if (!event.target.id || !Ext.fly(event.target).findParent(function (dom) { return dom.id == componentId })) {
                        this.setButtonsHidden(true, this.getButtonsSide(this.leftButtons && (this.leftButtonsShowMode == "focus" || this.leftButtonsShowMode == "mouseoverorfocus"),
                                                                         this.rightButtons && (this.rightButtonsShowMode == "focus" || this.rightButtonsShowMode == "mouseoverorfocus")));
                    } else {
                        if (!this.hasFocus) {
                            this.focus();
                        }
                    };
                }
            });
  2. changed the title [-]Right/Left buttons on TextFields briefly disappear on click when ShowMode="focus"[/-] [+]Right/Left buttons on TextFields briefly disappear on click when ShowMode="focus" and then reappear[/+] on Jan 15, 2016
  3. changed the title [-]Right/Left buttons on TextFields briefly disappear on click when ShowMode="focus" and then reappear[/-] [+]Right/Left buttons on TextFields briefly disappear and reappear on click when ShowMode="focus"[/+] on Jan 15, 2016
  4. changed the title [-]Right/Left buttons on TextFields briefly disappear and reappear on click when ShowMode="focus"[/-] [+]Right/Left buttons on TextFields briefly disappear and reappear on click when ShowMode="Focus"[/+] on Jan 15, 2016
  5. changed the title [-]Right/Left buttons on TextFields briefly disappear and reappear on click when ShowMode="Focus"[/-] [+]RightButtons/LeftButtons on TextFields briefly disappear and reappear on click when ShowMode="Focus"[/+] on Jan 15, 2016
  6. added this to the Release 3.3 milestone on Jan 15, 2016
  7. self-assigned this
    on Jan 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions