<commit_before>Kwf.FrontendForm.ErrorStyle.IconBubble = Ext.extend(Kwf.FrontendForm.ErrorStyle.Above, {
    showErrors: function(r) {

        for (var fieldName in r.errorFields) {
            var field = this.form.findField(fieldName);
            field.el.addClass('kwfFieldError');
            if (!field.errorEl) {
                field.errorEl = field.el.createChild({
                    cls: 'kwfFieldErrorIconBubble'
                });
                field.errorEl.createChild({
                    cls: 'message'
                });
                field.errorEl.createChild({
                    cls: 'arrow'
                });
                field.errorEl.child('.message').enableDisplayMode('block');
                field.errorEl.child('.arrow').enableDisplayMode('block');
                field.errorEl.child('.message').hide();
                field.errorEl.child('.arrow').hide();
                if (field instanceof Kwf.FrontendForm.TextArea) {
                    field.errorEl.alignTo(field.el.child('textarea'), 'tr', [-20, 2]);
                } else if (field instanceof Kwf.FrontendForm.Radio) {
                    field.errorEl.alignTo(field.el.child('.kwfFormFieldRadio span:last'), 'tr', [0, 0]);
                } else if (field instanceof Kwf.FrontendForm.MultiCheckbox) {
                    field.errorEl.alignTo(field.el.child('input'), 'tr', [-6, -8]);
                } else if (field instanceof Kwf.FrontendForm.Checkbox) {
                    field.errorEl.alignTo(field.el.child('input'), 'tr', [-6, -8]);
                } else if (field.el.child('input')) {
                    field.errorEl.alignTo(field.el.child('input'), 'tr', [-20, 2]);
                } else if (field.el.child('select')) {
                    field.errorEl.alignTo(field.el.child('select'), 'tr', [-40, 2]);
                } else {
                    field.errorEl.alignTo(field.el, 'r', [-40, 2]);
                }
                field.errorEl.enableDisplayMode('block');
                field.errorEl.hide();
                Kwf.Event.on(field.errorEl, 'mouseEnter', function() {
                    this.errorEl.child('.message').fadeIn({duration: 0.4});
                    this.errorEl.child('.arrow').fadeIn({duration: 0.4});
                }, field);
                Kwf.Event.on(field.errorEl, 'mouseLeave', function() {
                    this.errorEl.child('.message').fadeOut({duration: 0.2});
                    this.errorEl.child('.arrow').fadeOut({duration: 0.2});
                }, field);
            }
            field.errorEl.child('.message').update(r.errorFields[fieldName]);
            field.errorEl.clearOpacity();
            field.errorEl.fadeIn({
                endOpacity: 1 //TODO read from css (but that's hard for IE)
            });
        }

        if (r.errorMessages && r.errorMessages.length) {
            this._showErrorMessagesAbove(r.errorMessages, r);
        }<commit_msg>fix flickering of error message when moving fast across icon<commit_after>Kwf.FrontendForm.ErrorStyle.IconBubble = Ext.extend(Kwf.FrontendForm.ErrorStyle.Above, {
    showErrors: function(r) {

        for (var fieldName in r.errorFields) {
            var field = this.form.findField(fieldName);
            field.el.addClass('kwfFieldError');
            if (!field.errorEl) {
                field.errorEl = field.el.createChild({
                    cls: 'kwfFieldErrorIconBubble'
                });
                field.errorEl.createChild({
                    cls: 'message'
                });
                field.errorEl.createChild({
                    cls: 'arrow'
                });
                field.errorEl.child('.message').enableDisplayMode('block');
                field.errorEl.child('.arrow').enableDisplayMode('block');
                field.errorEl.child('.message').hide();
                field.errorEl.child('.arrow').hide();
                if (field instanceof Kwf.FrontendForm.TextArea) {
                    field.errorEl.alignTo(field.el.child('textarea'), 'tr', [-20, 2]);
                } else if (field instanceof Kwf.FrontendForm.Radio) {
                    field.errorEl.alignTo(field.el.child('.kwfFormFieldRadio span:last'), 'tr', [0, 0]);
                } else if (field instanceof Kwf.FrontendForm.MultiCheckbox) {
                    field.errorEl.alignTo(field.el.child('input'), 'tr', [-6, -8]);
                } else if (field instanceof Kwf.FrontendForm.Checkbox) {
                    field.errorEl.alignTo(field.el.child('input'), 'tr', [-6, -8]);
                } else if (field.el.child('input')) {
                    field.errorEl.alignTo(field.el.child('input'), 'tr', [-20, 2]);
                } else if (field.el.child('select')) {
                    field.errorEl.alignTo(field.el.child('select'), 'tr', [-40, 2]);
                } else {
                    field.errorEl.alignTo(field.el, 'r', [-40, 2]);
                }
                field.errorEl.enableDisplayMode('block');
                field.errorEl.hide();
                Kwf.Event.on(field.errorEl, 'mouseEnter', function() {
                    this.errorEl.child('.message').stopFx().fadeIn({duration: 0.4});
                    this.errorEl.child('.arrow').stopFx().fadeIn({duration: 0.4});
                }, field);
                Kwf.Event.on(field.errorEl, 'mouseLeave', function() {
                    this.errorEl.child('.message').stopFx().fadeOut({duration: 0.2});
                    this.errorEl.child('.arrow').stopFx().fadeOut({duration: 0.2});
                }, field);
            }
            field.errorEl.child('.message').update(r.errorFields[fieldName]);
            field.errorEl.clearOpacity();
            field.errorEl.fadeIn({
                endOpacity: 1 //TODO read from css (but that's hard for IE)
            });
        }

        if (r.errorMessages && r.errorMessages.length) {
            this._showErrorMessagesAbove(r.errorMessages, r);
        }
{'fraction_non_alphanumeric': 0.15206833026293753, 'fraction_numerical': 0.009043711271143862, 'mean_word_length': 1.6732318710832588, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5516267', 'n_tokens_mistral': 1755, 'n_tokens_neox': 1609, 'n_words': 251}