Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed, when datepicker opens incorrectly, when page doesn't have scroll #642

Merged
merged 1 commit into from
Feb 13, 2017
Merged

fixed, when datepicker opens incorrectly, when page doesn't have scroll #642

merged 1 commit into from
Feb 13, 2017

Conversation

VadymMakhonin
Copy link
Contributor

@VadymMakhonin VadymMakhonin commented Feb 13, 2017

@ZeStrid3r
Copy link
Contributor

ZeStrid3r commented Apr 5, 2017

Hi, this doesn't fix the (re)position issue #643:

show: function()
          {
              if (!this.isVisible()) {
 -               removeClass(this.el, 'is-hidden');
                  this._v = true;
                  this.draw();
                  if (this._o.bound) {
                      addEvent(document, 'click', this._onClick);
                      this.adjustPosition();
                  }
 +               removeClass(this.el, 'is-hidden');
                  if (typeof this._o.onOpen === 'function') {
                      this._o.onOpen.call(this);
                  }

adjustPosition function cannot read offsetHeight value if element has class "is-hidden", remove class function need to be placed after draw function AND before adjustPosition function:

show: function()
          {
              if (!this.isVisible()) {
 -               removeClass(this.el, 'is-hidden');
                  this._v = true;
                  this.draw();
 +               removeClass(this.el, 'is-hidden');
                  if (this._o.bound) {
                      addEvent(document, 'click', this._onClick);
                      this.adjustPosition();
                  }
                  if (typeof this._o.onOpen === 'function') {
                      this._o.onOpen.call(this);
                  }

@rikkert
Copy link
Member

rikkert commented Apr 5, 2017

Good catch, can you please make a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants