Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

IE problem with MatchesFieldValidator

$
0
0
Hi,

I am experiencing a problem with IE10 and MatchesFieldValidator that is set to PasswordItem.

I have two PasswordItem items where one of them has MatchesFieldValidator set and the other has added onChange handler when the others value is changed.

Unexpected behaviour is so that when I input some text into the item (any of those two) the text is getting selected continuously during typing that causes it to be deleted when I type a new character. When typing very quickly I am able to input more characters but always a little pause means that the text is selected and when I type another character it is deleted and new character typed instead of it...

This is behaviour in IE10, in Firefox 23 and Chrome 29 it is ok!

I am using SmartGWT 4.0p (from date 2013-08-28) and GWT 2.5.1.

Code:


        PasswordItem newPwd1 = new PasswordItem("new_passwd1", "New password");
        PasswordItem newPwd2 = new PasswordItem("new_passwd2", "Confirm password");

        newPwd1.setSelectOnFocus(true);
        newPwd1.setWidth(250);
        newPwd2.setSelectOnFocus(true);
        newPwd2.setWidth(250);

        MatchesFieldValidator matchValidator = new MatchesFieldValidator();
        matchValidator.setOtherField(newPwd1.getName());

        newPwd2.setValidators(matchValidator);
        newPwd2.setValidateOnChange(true);
        newPwd1.addChangedHandler(new ChangedHandler() {
            @Override
            public void onChanged(ChangedEvent event) {
                newPwd2.validate();
            }
        });

        DynamicForm df = new DynamicForm();

        df.setShowErrorIcons(false);
        df.setTitleSuffix(": ");
        df.setRequiredTitleSuffix(": ");
        df.setWrapItemTitles(false);
        df.setAutoFocus(true);
        df.setSaveOnEnter(true);
        df.addSubmitValuesHandler(new SubmitValuesHandler() {
            @Override
            public void onSubmitValues(SubmitValuesEvent event) {
                if (Ask.this.onOk())
                    Ask.this.close();
            }
        });
        df.setItems(items);

Possibly similar issue: http://forums.smartclient.com/showthread.php?t=24070 ?

Has anyone else experiencing this? Or has anybody any suggestion? Thanks.

Viewing all articles
Browse latest Browse all 4756

Trending Articles