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: Print poup and buffering DOM references #980

Merged
merged 4 commits into from
Apr 8, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/viewers/doc/DocBaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ class DocBaseViewer extends BaseViewer {
* @return {void}
*/
initPrint() {
this.printPopup = new Popup(this.containerEl);
this.printPopup = new Popup(this.rootEl);

const printCheckmark = document.createElement('div');
printCheckmark.className = `bp-print-check ${CLASS_HIDDEN}`;
Expand Down
30 changes: 16 additions & 14 deletions src/lib/viewers/media/_mediaBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,25 @@
}

// When media is buffering, show only the crawler
.bp-is-buffering .bp-loading-wrapper,
.bp-is-buffering.bp-loaded .bp-loading-wrapper {
// Show loading indicator immediately
animation-name: none;
display: block;
.bp {
&.bp-loaded .bp-is-buffering .bp-loading-wrapper,
.bp-is-buffering .bp-loading-wrapper {
// Show loading indicator immediately
animation-name: none;
display: flex;

.bp-icon,
.bp-loading-text,
.bp-loading-btn-container {
display: none;
}
.bp-icon,
.bp-loading-text,
.bp-loading-btn-container {
display: none;
}

.bp-crawler-wrapper {
position: static;
.bp-crawler-wrapper {
position: static;

.bp-crawler div {
background-color: $box-blue;
.bp-crawler div {
background-color: $box-blue;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/viewers/office/OfficeViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class OfficeViewer extends BaseViewer {
* @return {void}
*/
initPrint() {
this.printPopup = new Popup(this.containerEl);
this.printPopup = new Popup(this.rootEl);

const printCheckmark = document.createElement('div');
printCheckmark.className = `bp-print-check ${CLASS_HIDDEN}`;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/viewers/text/PlainTextViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class PlainTextViewer extends TextBaseViewer {
* @return {void}
*/
initPrint() {
this.printPopup = new Popup(this.containerEl);
this.printPopup = new Popup(this.rootEl);

const printCheckmark = document.createElement('div');
printCheckmark.className = `bp-print-check ${CLASS_HIDDEN}`;
Expand Down