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

fix(modal) optimize model.resetScrollbar , resolves #1831 #1837

Merged
merged 5 commits into from Oct 23, 2018

Conversation

rinick
Copy link
Contributor

@rinick rinick commented May 16, 2018

modal resetScrollbar should revert the change only when the change was done in the first place

@codecov
Copy link

codecov bot commented May 16, 2018

Codecov Report

Merging #1837 into dev will increase coverage by 3.62%.
The diff coverage is 95%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1837      +/-   ##
==========================================
+ Coverage   61.04%   64.66%   +3.62%     
==========================================
  Files         154      154              
  Lines        2862     2870       +8     
  Branches      791      792       +1     
==========================================
+ Hits         1747     1856     +109     
+ Misses        800      727      -73     
+ Partials      315      287      -28
Impacted Files Coverage Δ
src/components/modal/modal.js 64.25% <95%> (+40.77%) ⬆️
src/utils/object.js 50% <0%> (+3.33%) ⬆️
src/utils/dom.js 57.47% <0%> (+6.89%) ⬆️
src/directives/modal/modal.js 77.77% <0%> (+22.22%) ⬆️
src/utils/bv-event.class.js 72.72% <0%> (+72.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4ad499...0131d8e. Read the comment docs.

@Remo
Copy link

Remo commented Aug 4, 2018

Is there anything we can do to get this merged?

@tmorehouse tmorehouse merged commit a622358 into bootstrap-vue:dev Oct 23, 2018
shinrox added a commit to shinrox/bootstrap-vue that referenced this pull request Oct 26, 2018
* dev: (31 commits)
  feat(card): support left and right image placement (bootstrap-vue#1981)
  fix(collapse/toggle): "collapsed" class cleared when component updated (bootstrap-vue#2102)
  fix(form-file): Add validation of single file (bootstrap-vue#2028)
  chore(docs): minor update to the b-form-input docs
  chore(docs): Minor update to b-form-input docs
  feat(table): Add row-unhovered event (bootstrap-vue#1874)
  feat(table): Support contextmenu event binding for table rows (bootstrap-vue#2064)
  docs(table): fix minor typo (bootstrap-vue#2093)
  feat(table): Support sorting on nested object properties (bootstrap-vue#1868)
  perf(modal): optimize model.resetScrollbar, resolves bootstrap-vue#1831  (bootstrap-vue#1837)
  docs: Update images reference section (bootstrap-vue#1999)
  fix(observe-dom): fix comment typo (bootstrap-vue#2084)
  chore(modal): trivial word fix in comment (bootstrap-vue#2089)
  (docs): Fix grammer in Intro readme (bootstrap-vue#2092)
  fix(modal): prevent scrolling on .modal-content focus, fixes bootstrap-vue#1748 (bootstrap-vue#2060)
  feat(pagination):  added slots for first, prev, next, last, and ellipsis. Fixes bootstrap-vue#1870. (bootstrap-vue#1980)
  Handle state change on validated fields. (bootstrap-vue#1984)
  fix(docs): input group prepend slot typo (bootstrap-vue#2059)
  fix(dependencies): replace opencollective with opencollective-postintall (bootstrap-vue#2067)
  fix(docs): change b-input-group attribute 'left' to 'prepend' (bootstrap-vue#2017)
  ...
@tmorehouse
Copy link
Member

Hmmm, we are looking at making modal support multiple modals opened at a time, and basically
calling setScrollbar and resetSCrollbar only if the modal is the only one opened at the current time.

We may have to change how this is done, since the modal that was first opened may not be the modal that is closed last, and may not have a reference of the elements adjusted.

I think we will have to change from storing the remembered lists of adjustments on the modal instance (this._xxx) to the actual body element (document.body._xxx)

I'll work on a PR that can handle the new requirements, while still keeping the destroy process somewhat fast.

@tmorehouse tmorehouse mentioned this pull request Nov 14, 2018
89 tasks
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