Results 1 to 2 of 2

Thread: Checkbox handlers behavior

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default Checkbox handlers behavior

    In GXT 4.0.3 (and even in 4.0.4 January 21) it becomes impossible to add logic to checkbox to change value only when required and do not change value otherwise. Tried the following ways:

    1. ChangeHandler for checkbox gives the opposite value for event for IE and Chrome. For example:

    Code:
    CheckBox checkBox = new CheckBox();
    checkBox.addChangeHandler(event -> {
        boolean newVal = ((CheckBox) event.getSource()).getValue();
        //For IE newVal=false when checked first time, for Chrome it is true. 
    });
    What is the purpose to make this method a part of CheckBox if it behaves differently for browsers?

    2. If ValueChangeHandler used, works for Chrome, but not for IE.
    Code:
    checkBox.addValueChangeHandler(event -> {
    //value is already changed there (to true)           
                if (logic when checkbox value should stay false) {
                   checkbox.setValue(false); or  checkbox.setValue(false, false); keeps checkbox checked in IE
                    //show MessageBox to user about rules when it can be checked
                }
            });
    How to make it work for IE?

    3. & 4. were only tests trying to find a workaround.


    3.
    Code:
    checkBox.addHandler(new CheckChangedEvent.CheckChangedHandler() {
                @Override
                public void onCheckChanged(CheckChangedEvent checkChangedEvent) {
                    //never inside
                }
            }, CheckChangedEvent.getType());
    4.
    Code:
    available.addHandler(new BeforeCheckChangeEvent.BeforeCheckChangeHandler() {
                @Override
                public void onBeforeCheckChange(BeforeCheckChangeEvent beforeCheckChangeEvent) {
                   //never inside
                }
            }, BeforeCheckChangeEvent.getType());

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,006

    Default

    Hello there-

    I apologize I do not have the answer to how to make this work. I have shared this with the support staff to look into. You may also report this through our support portal. We appreciate your patience with us.

    Kindly,

    Michele

Similar Threads

  1. CheckBoxSelectionModel - Checkbox weird behavior
    By samshu in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 3 Dec 2010, 4:26 AM
  2. Replies: 2
    Last Post: 22 Jul 2010, 6:33 AM
  3. Checkbox handlers
    By ajmPal in forum Ext 2.x: Help & Discussion
    Replies: 31
    Last Post: 27 Jan 2009, 10:33 AM
  4. Beta to RC1 - checkbox.setValue() behavior change
    By Troy Wolf in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 8 Nov 2007, 8:56 AM
  5. Behavior idea, Fieldset checkbox
    By 72 in forum Community Discussion
    Replies: 0
    Last Post: 1 Oct 2007, 5:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •