From fd5f40a94dc66806aa98822c87ade74d4a8025d7 Mon Sep 17 00:00:00 2001
From: RomanKis <romaikiss@gmail.com>
Date: Thu, 7 Dec 2017 12:20:52 +0200
Subject: [PATCH] 8410: Custom Checkout Step and Shipping Step are Highlighted

---
 .../Checkout/view/frontend/web/js/view/payment.js      | 10 ++++++++++
 .../Checkout/view/frontend/web/js/view/shipping.js     |  8 ++++++++
 2 files changed, 18 insertions(+)

diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/payment.js b/app/code/Magento/Checkout/view/frontend/web/js/view/payment.js
index c17e5e40d5c..94ccf7a24f3 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/view/payment.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/view/payment.js
@@ -46,8 +46,18 @@ define([
 
         /** @inheritdoc */
         initialize: function () {
+            var self = this;
             this._super();
             checkoutDataResolver.resolvePaymentMethod();
+
+            //If some step is active this step will become inactive.
+            stepNavigator.steps().some(function (element) {
+                if (element.isVisible()) {
+                    self.isVisible(false);
+                    return true;
+                }
+            });
+
             stepNavigator.registerStep(
                 'payment',
                 null,
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js
index 619de95e467..a6e7e3efd3d 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js
@@ -82,6 +82,14 @@ define([
             this._super();
 
             if (!quote.isVirtual()) {
+                //If some step is active this step will become inactive.
+                stepNavigator.steps().some(function (element) {
+                    if (element.isVisible()) {
+                        self.visible(false);
+                        return true;
+                    }
+                });
+
                 stepNavigator.registerStep(
                     'shipping',
                     '',
-- 
GitLab