Skip to content

Commit

Permalink
Fixes the lint errors for issue #615
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Bonneau <alexandre.bonneau@linuxfr.eu>
  • Loading branch information
AlexandreBonneau committed Oct 27, 2018
1 parent e62f002 commit 5619d8c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/AutoNumeric.js
Expand Up @@ -1194,7 +1194,7 @@ export default class AutoNumeric {
this._setupFormListener();

if (AutoNumericHelper.isIE11()) {
this._onInputFunc = e => { this._onInput(e); };
this._onInputFunc = () => { this._onInput(); };
this.domElement.addEventListener('input', this._onInputFunc, false);
}

Expand Down Expand Up @@ -6576,10 +6576,9 @@ To solve that, you'd need to either set \`decimalPlacesRawValue\` to \`null\`, o
* Handler for 'input' events.
* This is only used by IE11 when the user clicks the icon to empty the input element
*
* @param {KeyboardEvent} e
* @private
*/
_onInput(e) {
_onInput() {
if (!this.isEditing && this.domElement.value === '') {
// We infer that the IE 'reset' icon has been clicked, so we update the `rawValue` accordingly
this.clear();
Expand Down Expand Up @@ -7317,14 +7316,14 @@ To solve that, you'd need to either set \`decimalPlacesRawValue\` to \`null\`, o
if (this.settings.wheelOn === AutoNumeric.options.wheelOn.focus) {
if (this.isFocused) {
if (!e.shiftKey) {
this.wheelAction(e);
this._wheelAction(e);
}
} else if (e.shiftKey) {
this.wheelAction(e);
this._wheelAction(e);
}
} else if (this.settings.wheelOn === AutoNumeric.options.wheelOn.hover) {
if (!e.shiftKey) {
this.wheelAction(e);
this._wheelAction(e);
} else {
// Note: When not `defaultPrevented`, Shift + mouse wheel is reserved by the browsers for horizontal scrolling.
// Hence, using the Shift key with the `wheelOn` 'hover' option will only scroll the page if we prevent the default behavior
Expand All @@ -7344,7 +7343,7 @@ To solve that, you'd need to either set \`decimalPlacesRawValue\` to \`null\`, o
*
* @param {WheelEvent} e The `wheel` event
*/
wheelAction(e) {
_wheelAction(e) {
this.isWheelEvent = true; // Keep the info that we are currently managing a mouse wheel event

// 0) First, save the caret position so we can set it back once the value has been changed
Expand Down

0 comments on commit 5619d8c

Please sign in to comment.