Skip to content

Commit

Permalink
Fix extra scrollbar on viewer
Browse files Browse the repository at this point in the history
  - Set display: block on <embed> to keep the enclosing <div> from
    taking up space
  - Don't reappend listener <div>. It's already where it should be.
  • Loading branch information
pbrant committed Feb 24, 2017
1 parent 8f5fc8d commit 2236097
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,7 @@ function webViewerInitialized() {

if (imageStreamDecoderListener) {
var moduleEl = document.createElement('embed');
moduleEl.setAttribute('style', 'display: block;');
moduleEl.setAttribute('width', 0);
moduleEl.setAttribute('height', 0);
moduleEl.setAttribute('path', 'image_stream_decoder');
Expand All @@ -1493,8 +1494,6 @@ function webViewerInitialized() {
listenerEl.addEventListener('error', disableImageStreamDecoder('error'), true);
listenerEl.addEventListener('crash', disableImageStreamDecoder('crash'), true);
listenerEl.appendChild(moduleEl);

document.body.appendChild(listenerEl);
}

//#if !(FIREFOX || MOZCENTRAL)
Expand Down

0 comments on commit 2236097

Please sign in to comment.