jordandelozier / wysibb

WYSIWYG BBcode editor
http://www.wysibb.com
246 stars 86 forks source link

Bug with <A> on onlyBBmode=true #209

Open Mijsoot opened 1 year ago

Mijsoot commented 1 year ago

Hi,

I found a another one little mistake with a similar trouble, when we have 'onlyBBmode=true'.

I changed this :

    selectLastRange: function() {
        if (this.lastRange) {
            this.body.focus();
            this.selectRange(this.lastRange);
            this.lastRange=false;
        }
    },

To this :

    selectLastRange: function() {
        if (this.lastRange) {
            //this.body.focus();
            if(!this.options.onlyBBmode){
                this.body.focus();
            }else{
                this.$txtArea.focus();
            }
            this.selectRange(this.lastRange);
            this.lastRange=false;
        }
    },

Friendly