Skip to content

Commit 316a436

Browse files
authored
Merge pull request #7 from magento-vanilla/bugs
MAGETWO-53114: Focus automatically disappear from Email field on login popup when Guest Checkout is disabled
2 parents 6e8d184 + b2b8026 commit 316a436

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ define([
107107
isLoading: ko.observable(false),
108108
initSidebar: initSidebar,
109109

110+
/**
111+
* Close mini shopping cart.
112+
*/
113+
closeMinicart: function () {
114+
$('[data-block="minicart"]').find('[data-role="dropdownDialog"]').dropdownDialog('close');
115+
},
116+
110117
/**
111118
* @return {Boolean}
112119
*/

app/code/Magento/Checkout/view/frontend/web/template/minicart/content.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@
5454
type="button"
5555
class="action primary checkout"
5656
data-action="close"
57-
data-bind="attr: {title: $t('Go to Checkout')}">
57+
data-bind="
58+
attr: {
59+
title: $t('Go to Checkout')
60+
},
61+
click: closeMinicart()
62+
">
5863
<!-- ko i18n: 'Go to Checkout' --><!-- /ko -->
5964
</button>
6065
<div data-bind="html: getCartParam('extra_actions')"></div>

app/code/Magento/Customer/view/frontend/web/js/model/authentication-popup.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ define(
2121
var options = {
2222
'type': 'popup',
2323
'modalClass': 'popup-authentication',
24+
'focus': '[name=username]',
2425
'responsive': true,
2526
'innerScroll': true,
2627
'trigger': '.proceed-to-checkout',

0 commit comments

Comments
 (0)