| Index: chrome/browser/resources/print_preview/margin_settings.js
|
| diff --git a/chrome/browser/resources/print_preview/margin_settings.js b/chrome/browser/resources/print_preview/margin_settings.js
|
| index 819d79fc0ede01d2eef1fc6b049990a3c7752efe..15a6603ea1ebda725a4a4a080b82bd3caafa4a07 100644
|
| --- a/chrome/browser/resources/print_preview/margin_settings.js
|
| +++ b/chrome/browser/resources/print_preview/margin_settings.js
|
| @@ -267,7 +267,7 @@ cr.define('print_preview', function() {
|
| */
|
| onSidebarMouseOver_: function(e) {
|
| if (!this.forceDisplayingMarginLines_)
|
| - this.marginsUI.hide();
|
| + this.marginsUI.hide(false);
|
| },
|
|
|
| /**
|
| @@ -298,7 +298,7 @@ cr.define('print_preview', function() {
|
| onPDFGenerationError_: function() {
|
| if (this.isCustomMarginsSelected()) {
|
| this.removeCustomMarginEventListeners_();
|
| - this.marginsUI.hide();
|
| + this.marginsUI.hide(true);
|
| }
|
| },
|
|
|
| @@ -426,6 +426,8 @@ cr.define('print_preview', function() {
|
| $('sidebar').onmouseover = this.onSidebarMouseOver_.bind(this);
|
| this.eventTracker_.add(
|
| this.marginsUI, 'DragEvent', this.onDragEvent_.bind(this), false);
|
| + this.eventTracker_.add(document, 'marginTextboxFocused',
|
| + this.onMarginTextboxFocused_.bind(this), false);
|
| },
|
|
|
| /**
|
| @@ -436,7 +438,8 @@ cr.define('print_preview', function() {
|
| $('mainview').onmouseover = null;
|
| $('sidebar').onmouseover = null;
|
| this.eventTracker_.remove(this.marginsUI, 'DragEvent');
|
| - this.marginsUI.hide();
|
| + this.eventTracker_.remove(document, 'marginTextboxFocused');
|
| + this.marginsUI.hide(true);
|
| },
|
|
|
| /**
|
| @@ -470,6 +473,16 @@ cr.define('print_preview', function() {
|
| },
|
|
|
| /**
|
| + * Executes when a margin textbox is focused. Used for improved
|
| + * accessibility.
|
| + * @private
|
| + */
|
| + onMarginTextboxFocused_: function() {
|
| + this.forceDisplayingMarginLines_ = true;
|
| + this.marginsUI.show();
|
| + },
|
| +
|
| + /**
|
| * Executes when user selects a different margin option, ie,
|
| * |this.marginList_.selectedIndex| is changed.
|
| * @private
|
|
|