Chromium Code Reviews| Index: chrome/browser/resources/print_preview/previewarea/margin_control.js |
| diff --git a/chrome/browser/resources/print_preview/previewarea/margin_control.js b/chrome/browser/resources/print_preview/previewarea/margin_control.js |
| index 7ec2527e7a17e02389387adba3c9c806b7ec8b3d..5e5fa48d398ac438c2ac251da2467cec0610077b 100644 |
| --- a/chrome/browser/resources/print_preview/previewarea/margin_control.js |
| +++ b/chrome/browser/resources/print_preview/previewarea/margin_control.js |
| @@ -349,6 +349,17 @@ cr.define('print_preview', function() { |
| */ |
| setIsFocused_: function(isFocused) { |
| this.isFocused_ = isFocused; |
| + // TODO(tkent): This is a workaround of a preview-area scrolling |
| + // issue. Blink scrolls preview-area on focus, but we don't want it. We |
| + // should adjust scroll position of PDF preview and positions of |
| + // MarginContgrols here, or restructure the HTML so that the PDF review |
| + // and MarginControls are on the single scrollable container. |
| + // crbug.com/601341 |
| + if (isFocused) { |
| + var previewArea = $('preview-area'); |
| + previewArea.scrollTop = 0; |
| + previewArea.scrollLeft = 0; |
| + } |
| }, |
| /** |
| @@ -380,6 +391,7 @@ cr.define('print_preview', function() { |
| var elStyle = window.getComputedStyle(this.getElement()); |
| var opacity = parseInt(elStyle.getPropertyValue('opacity'), 10); |
|
dpapad
2016/04/29 17:59:13
Nit: Instead of comparing opacity to 0 twice, how
tkent
2016/05/02 08:05:19
Done.
|
| this.textbox_.setAttribute('aria-hidden', opacity == 0); |
| + this.textbox_.disabled = opacity == 0; |
| }, |
| /** |