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 bug]: Added null check on the parentElement in focusOtherModal() #2612

Closed
wants to merge 1 commit into from
Closed

Conversation

mario-nguyen
Copy link

If the modal is created without parent, the console will display error on closing function:

  modal.component.js:278 Uncaught TypeError: Cannot read property 'querySelectorAll' of null
    at ModalDirective.webpackJsonp.../../../../ngx-bootstrap/modal/modal.component.js.ModalDirective.focusOtherModal (modal.component.js:278)
    at modal.component.js:208
    at callbackRemove (modal.component.js:237)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424)
    at Object.onInvokeTask (core.es5.js:3881)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
    at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (zone.js:191)
    at ZoneTask.invoke (zone.js:486)
    at timer (zone.js:1512)

@codecov
Copy link

codecov bot commented Sep 11, 2017

Codecov Report

Merging #2612 into development will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #2612      +/-   ##
===============================================
- Coverage        65.99%   65.98%   -0.02%     
===============================================
  Files              182      182              
  Lines             5011     5012       +1     
  Branches           790      791       +1     
===============================================
  Hits              3307     3307              
- Misses            1391     1392       +1     
  Partials           313      313
Impacted Files Coverage Δ
src/modal/modal.component.ts 18.45% <0%> (-0.12%) ⬇️

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 101fb20...e9e8a68. Read the comment docs.

@Flood
Copy link

Flood commented Sep 14, 2017

I'm experiencing the same error. Please merge.

@IlyaSurmay IlyaSurmay added this to the v2.0.0 milestone Sep 14, 2017
@Flood
Copy link

Flood commented Sep 14, 2017

@IlyaSurmay Can you release it to version 1.9.3? This issue was introduced 13 july and I have verified that this commit solves the issue.

@deggesim
Copy link

Same issue here. I'm using version 1.9.3

@valorkin
Copy link
Member

valorkin commented Oct 3, 2017

@IlyaSurmay please resolve conflicts and push to new branch, so we can merge

@valorkin
Copy link
Member

valorkin commented Oct 4, 2017

@mario-siama thanks again!
merged in #2792

@valorkin
Copy link
Member

valorkin commented Oct 4, 2017

just so you know what we were doing lately :)

@valorkin
Copy link
Member

valorkin commented Oct 4, 2017

https://ngx-bootstrap.surge.sh/

@Flood
Copy link

Flood commented Oct 4, 2017

Thank you! Is it possible to merge into 1.9.4 so we don't need to use beta version?

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

Successfully merging this pull request may close these issues.

6 participants