forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - magento#16042: [Forwardport] fix for dropdown toggle icon in cart (by @chirag-wagento) - magento#16045: [Forwardport] Extend default config instead overwrite (by @chirag-wagento) - magento#16022: Wishlist: Remove unnecessary parameter from invoking toHtml() method (by @rogyar) - magento#15916: [Forwardport] [Resolved : Changing @tab-content__border variable has no effect in B� (by @hitesh-wagento) - magento#15884: [Forwardport 2.3] Trim username on customer account login page (by @dankhrapiyush) - magento#15896: [Forwardport] Solve overlapping Issue on every Home page & category page of Hot Sel (by @chirag-wagento) - magento#15879: [Forwardport] [Resolved : limiter float too generic] (by @hitesh-wagento) Fixed GitHub Issues: - magento#14999: Changing @tab-content__border variable has no effect in Blank theme (reported by @denistrator) has been fixed in magento#15916 by @hitesh-wagento in 2.3-develop branch Related commits: 1. 21ce9fb - magento#6058: IE11 user login email validation fails if field has leading or trailing space (reported by @dnadle) has been fixed in magento#15884 by @dankhrapiyush in 2.3-develop branch Related commits: 1. c44f1f8 - magento#15213: Alignment & overlapping Issue on every Home page & category page of Hot Seller section (reported by @cnviradiya) has been fixed in magento#15896 by @chirag-wagento in 2.3-develop branch Related commits: 1. a851540 - magento#15323: limiter float too generic (reported by @DanielRuf) has been fixed in magento#15879 by @hitesh-wagento in 2.3-develop branch Related commits: 1. 172e5ae
- Loading branch information
Showing
10 changed files
with
98 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
app/code/Magento/Customer/view/frontend/web/js/trim-username.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
define([ | ||
'jquery' | ||
], function ($) { | ||
'use strict'; | ||
|
||
$.widget('mage.trimUsername', { | ||
options: { | ||
cache: {}, | ||
formSelector: 'form', | ||
emailSelector: 'input[type="email"]' | ||
}, | ||
|
||
/** | ||
* Widget initialization | ||
* @private | ||
*/ | ||
_create: function () { | ||
// We need to look outside the module for backward compatibility, since someone can already use the module. | ||
// @todo Narrow this selector in 2.3 so it doesn't accidentally finds the email field from the | ||
// newsletter email field or any other "email" field. | ||
this.options.cache.email = $(this.options.formSelector).find(this.options.emailSelector); | ||
this._bind(); | ||
}, | ||
|
||
/** | ||
* Event binding, will monitor change, keyup and paste events. | ||
* @private | ||
*/ | ||
_bind: function () { | ||
if (this.options.cache.email.length) { | ||
this._on(this.options.cache.email, { | ||
'change': this._trimUsername, | ||
'keyup': this._trimUsername, | ||
'paste': this._trimUsername | ||
}); | ||
} | ||
}, | ||
|
||
/** | ||
* Trim username | ||
* @private | ||
*/ | ||
_trimUsername: function () { | ||
var username = this._getUsername().trim(); | ||
|
||
this.options.cache.email.val(username); | ||
}, | ||
|
||
/** | ||
* Get username value | ||
* @returns {*} | ||
* @private | ||
*/ | ||
_getUsername: function () { | ||
return this.options.cache.email.val(); | ||
} | ||
}); | ||
|
||
return $.mage.trimUsername; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters