Ensure that the textLayer has the same dimensions as the canvasWrapper (issue 6596)

This is a quick fix to get `scrollIntoView` working again for search results, but we really ought to re-write that function since it seems way too brittle.

Fixes 6596.
This commit is contained in:
Jonas Jenwald 2015-11-06 12:43:22 +01:00
parent 8079bdddb9
commit dbc611ac9d

View File

@ -351,8 +351,8 @@ var PDFPageView = (function PDFPageViewClosure() {
if (this.textLayerFactory) {
textLayerDiv = document.createElement('div');
textLayerDiv.className = 'textLayer';
textLayerDiv.style.width = canvas.style.width;
textLayerDiv.style.height = canvas.style.height;
textLayerDiv.style.width = canvasWrapper.style.width;
textLayerDiv.style.height = canvasWrapper.style.height;
if (this.annotationLayer && this.annotationLayer.div) {
// annotationLayer needs to stay on top
div.insertBefore(textLayerDiv, this.annotationLayer.div);