Commit b131a32a authored by Denis Kuznetsov's avatar Denis Kuznetsov Committed by Commit Bot

OOBE: Fix default focus for Enterprise enrollment screen

Focusing element marked as "focus-on-show" is done by oobe-dialog's
show() method. MultiStepBehavior triggers this method for elements
marked as for-step, but enrollment_screen used legacy layout where
each oobe-dialog was additionally wrapped in the <div>, and for-step
was set on the enclosing div instead of oobe-dialog.
As a result, show() was not called on corresponding oobe-dialog upon
step switch, and default focus was not set

Bug: 1021608
Change-Id: I5d103f735ff5155a190c0a74c7d215fe293a2c83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414189Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Denis Kuznetsov [CET] <antrim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807869}
parent 4285cf4c
...@@ -41,8 +41,7 @@ ...@@ -41,8 +41,7 @@
</div> </div>
<!-- ENROLLMENT IN PROGRESS (SPINNER) DIALOG --> <!-- ENROLLMENT IN PROGRESS (SPINNER) DIALOG -->
<div id="step-working" for-step="working"> <oobe-dialog id="step-working" for-step="working"
<oobe-dialog id="working"
title-key="oauthEnrollScreenTitle"> title-key="oauthEnrollScreenTitle">
<hd-iron-icon slot="oobe-icon" <hd-iron-icon slot="oobe-icon"
icon1x="oobe-32:enterprise" icon2x="oobe-64:enterprise"> icon1x="oobe-32:enterprise" icon2x="oobe-64:enterprise">
...@@ -55,7 +54,6 @@ ...@@ -55,7 +54,6 @@
</div> </div>
</div> </div>
</oobe-dialog> </oobe-dialog>
</div>
<div id="step-ad-join" for-step="ad-join"> <div id="step-ad-join" for-step="ad-join">
<offline-ad-login id="adJoinUI" is-domain-join <offline-ad-login id="adJoinUI" is-domain-join
class="fit" class="fit"
...@@ -74,9 +72,8 @@ ...@@ -74,9 +72,8 @@
AttributePrompt: [ 'Done' ] AttributePrompt: [ 'Done' ]
ActiveDirectoryJoin: [ 'Try Again' ] ActiveDirectoryJoin: [ 'Try Again' ]
--> -->
<div id="step-error" role="alert" <oobe-dialog id="step-error" has-buttons role="alert"
for-step="error, attribute-prompt-error, active-directory-join-error"> for-step="error, attribute-prompt-error, active-directory-join-error">
<oobe-dialog id="errorCard" has-buttons>
<hd-iron-icon slot="oobe-icon" <hd-iron-icon slot="oobe-icon"
icon1x="oobe-32:enterprise" icon1x="oobe-32:enterprise"
icon2x="oobe-64:enterprise"></hd-iron-icon> icon2x="oobe-64:enterprise"></hd-iron-icon>
...@@ -133,11 +130,9 @@ ...@@ -133,11 +130,9 @@
</div> </div>
</oobe-dialog> </oobe-dialog>
</div>
<!-- SUCCESS DIALOG --> <!-- SUCCESS DIALOG -->
<div id="step-success" for-step="success" role="alert"> <oobe-dialog has-buttons id="step-success" for-step="success" role="alert"
<oobe-dialog id="successCard" has-buttons
title-key="oauthEnrollSuccessTitle" footer-shrinkable> title-key="oauthEnrollSuccessTitle" footer-shrinkable>
<hd-iron-icon slot="oobe-icon" <hd-iron-icon slot="oobe-icon"
icon1x="oobe-32:enterprise" icon2x="oobe-64:enterprise"> icon1x="oobe-32:enterprise" icon2x="oobe-64:enterprise">
...@@ -160,12 +155,10 @@ ...@@ -160,12 +155,10 @@
class="focus-on-show"></oobe-text-button> class="focus-on-show"></oobe-text-button>
</div> </div>
</oobe-dialog> </oobe-dialog>
</div>
<!-- ATTRIBUTE PROMPT DIALOG --> <!-- ATTRIBUTE PROMPT DIALOG -->
<div id="step-attribute-prompt" for-step="attribute-prompt"> <oobe-dialog id="step-attribute-prompt" for-step="attribute-prompt"
<oobe-dialog id="attributePromptCard" has-buttons has-buttons title-key="oauthEnrollScreenTitle"
title-key="oauthEnrollScreenTitle"
subtitle-key="oauthEnrollDeviceInformation"> subtitle-key="oauthEnrollDeviceInformation">
<hd-iron-icon slot="oobe-icon" <hd-iron-icon slot="oobe-icon"
icon1x="oobe-32:enterprise" icon2x="oobe-64:enterprise"> icon1x="oobe-32:enterprise" icon2x="oobe-64:enterprise">
...@@ -200,7 +193,6 @@ ...@@ -200,7 +193,6 @@
</div> </div>
</oobe-dialog> </oobe-dialog>
</div> </div>
</div>
<div class="popup-overlay" <div class="popup-overlay"
hidden="[[!showPopupOverlay_(authenticatorDialogDisplayed_, hidden="[[!showPopupOverlay_(authenticatorDialogDisplayed_,
isSamlSsoVisible_)]]"> isSamlSsoVisible_)]]">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment