albertogasparin/Optiscroll

contentElement settings option?

Sinled opened this issue · 3 comments

Hi,

while debugging strange bug in my application, i've stumbled upon this piece of code

    // unwrap content
    if (!this.settings.contentElement) {
      while(child = scrollEl.childNodes[0]) {
        element.insertBefore(child, scrollEl);
      }
      element.removeChild(scrollEl);
      this.scrollEl = null;
    }

I'd tried to find any reference for contentElement but found none.
Am i missing something or there should be check for wrapContent?

You are absolutely right. That line is referring to an old option and it should be wrapContent indeed.
Do you feel like creating a PR with the fix?

@albertogasparin Done. Or should i also run prepublish and commit results?

Thanks a lot for the PR. I merged it and published a new version with the fix.