From 11befc125f73b8f8b9e5840832cfbeab55b0dfd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Fri, 22 Jan 2021 10:15:35 +0100 Subject: [PATCH 1/7] fix(b-form-input/b-form-textarea): legacy browser support --- src/mixins/form-text.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mixins/form-text.js b/src/mixins/form-text.js index 87ddf67b160..f288cb7bdb2 100644 --- a/src/mixins/form-text.js +++ b/src/mixins/form-text.js @@ -102,6 +102,7 @@ export const formTextMixin = Vue.extend({ }, watch: { [MODEL_PROP_NAME](newValue) { + console.log('form-text: watch value', newValue) const stringifyValue = toString(newValue) const modifiedValue = this.modifyValue(newValue) if (stringifyValue !== this.localValue || modifiedValue !== this.vModelValue) { @@ -149,6 +150,7 @@ export const formTextMixin = Vue.extend({ return value }, updateValue(value, force = false) { + console.log('form-text: updateValue', value) const { lazy } = this if (lazy && !force) { return @@ -198,6 +200,7 @@ export const formTextMixin = Vue.extend({ } const { value } = event.target const formattedValue = this.formatValue(value, event) + console.log('form-text: onInput', formattedValue) // Exit when the `formatter` function strictly returned `false` // or prevented the input event /* istanbul ignore next */ @@ -212,6 +215,7 @@ export const formTextMixin = Vue.extend({ onChange(event) { const { value } = event.target const formattedValue = this.formatValue(value, event) + console.log('form-text: onChange', formattedValue) // Exit when the `formatter` function strictly returned `false` // or prevented the input event /* istanbul ignore next */ @@ -228,6 +232,7 @@ export const formTextMixin = Vue.extend({ // on mobile browsers (e.g. caused by autocomplete) const { value } = event.target const formattedValue = this.formatValue(value, event, true) + console.log('form-text: onBlur', formattedValue) if (formattedValue !== false) { // We need to use the modified value here to apply the // `.trim` and `.number` modifiers properly From d4cd34a1296398cf2d6adf31b41b30a9e44bfad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Fri, 22 Jan 2021 10:33:46 +0100 Subject: [PATCH 2/7] Update form-text.js --- src/mixins/form-text.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/mixins/form-text.js b/src/mixins/form-text.js index f288cb7bdb2..39fd995c6ff 100644 --- a/src/mixins/form-text.js +++ b/src/mixins/form-text.js @@ -102,7 +102,6 @@ export const formTextMixin = Vue.extend({ }, watch: { [MODEL_PROP_NAME](newValue) { - console.log('form-text: watch value', newValue) const stringifyValue = toString(newValue) const modifiedValue = this.modifyValue(newValue) if (stringifyValue !== this.localValue || modifiedValue !== this.vModelValue) { @@ -150,7 +149,6 @@ export const formTextMixin = Vue.extend({ return value }, updateValue(value, force = false) { - console.log('form-text: updateValue', value) const { lazy } = this if (lazy && !force) { return @@ -198,9 +196,8 @@ export const formTextMixin = Vue.extend({ if (event.target.composing) { return } - const { value } = event.target + const value = event.target.value const formattedValue = this.formatValue(value, event) - console.log('form-text: onInput', formattedValue) // Exit when the `formatter` function strictly returned `false` // or prevented the input event /* istanbul ignore next */ @@ -213,9 +210,8 @@ export const formTextMixin = Vue.extend({ this.$emit(EVENT_NAME_INPUT, formattedValue) }, onChange(event) { - const { value } = event.target + const value = event.target.value const formattedValue = this.formatValue(value, event) - console.log('form-text: onChange', formattedValue) // Exit when the `formatter` function strictly returned `false` // or prevented the input event /* istanbul ignore next */ @@ -230,9 +226,8 @@ export const formTextMixin = Vue.extend({ onBlur(event) { // Apply the `localValue` on blur to prevent cursor jumps // on mobile browsers (e.g. caused by autocomplete) - const { value } = event.target + const value = event.target.value const formattedValue = this.formatValue(value, event, true) - console.log('form-text: onBlur', formattedValue) if (formattedValue !== false) { // We need to use the modified value here to apply the // `.trim` and `.number` modifiers properly From b53d0cfe80d4388291b530ad0515c93e0366dd24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Fri, 22 Jan 2021 10:39:15 +0100 Subject: [PATCH 3/7] Revert "Update form-text.js" This reverts commit d4cd34a1296398cf2d6adf31b41b30a9e44bfad2. --- src/mixins/form-text.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mixins/form-text.js b/src/mixins/form-text.js index 39fd995c6ff..f288cb7bdb2 100644 --- a/src/mixins/form-text.js +++ b/src/mixins/form-text.js @@ -102,6 +102,7 @@ export const formTextMixin = Vue.extend({ }, watch: { [MODEL_PROP_NAME](newValue) { + console.log('form-text: watch value', newValue) const stringifyValue = toString(newValue) const modifiedValue = this.modifyValue(newValue) if (stringifyValue !== this.localValue || modifiedValue !== this.vModelValue) { @@ -149,6 +150,7 @@ export const formTextMixin = Vue.extend({ return value }, updateValue(value, force = false) { + console.log('form-text: updateValue', value) const { lazy } = this if (lazy && !force) { return @@ -196,8 +198,9 @@ export const formTextMixin = Vue.extend({ if (event.target.composing) { return } - const value = event.target.value + const { value } = event.target const formattedValue = this.formatValue(value, event) + console.log('form-text: onInput', formattedValue) // Exit when the `formatter` function strictly returned `false` // or prevented the input event /* istanbul ignore next */ @@ -210,8 +213,9 @@ export const formTextMixin = Vue.extend({ this.$emit(EVENT_NAME_INPUT, formattedValue) }, onChange(event) { - const value = event.target.value + const { value } = event.target const formattedValue = this.formatValue(value, event) + console.log('form-text: onChange', formattedValue) // Exit when the `formatter` function strictly returned `false` // or prevented the input event /* istanbul ignore next */ @@ -226,8 +230,9 @@ export const formTextMixin = Vue.extend({ onBlur(event) { // Apply the `localValue` on blur to prevent cursor jumps // on mobile browsers (e.g. caused by autocomplete) - const value = event.target.value + const { value } = event.target const formattedValue = this.formatValue(value, event, true) + console.log('form-text: onBlur', formattedValue) if (formattedValue !== false) { // We need to use the modified value here to apply the // `.trim` and `.number` modifiers properly From 271456ee79447c8bc00e6829f5fdc9e2c78111a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Fri, 22 Jan 2021 10:40:55 +0100 Subject: [PATCH 4/7] Update form-text.js --- src/mixins/form-text.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mixins/form-text.js b/src/mixins/form-text.js index f288cb7bdb2..02736acf680 100644 --- a/src/mixins/form-text.js +++ b/src/mixins/form-text.js @@ -199,6 +199,7 @@ export const formTextMixin = Vue.extend({ return } const { value } = event.target + console.log('form-text: onInput', event.target, value) const formattedValue = this.formatValue(value, event) console.log('form-text: onInput', formattedValue) // Exit when the `formatter` function strictly returned `false` From 367c956ca19f93cb9222ac9b9261f2dc80135385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Fri, 22 Jan 2021 10:47:08 +0100 Subject: [PATCH 5/7] Update props.js --- src/utils/props.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/props.js b/src/utils/props.js index 62eaa6b1337..6d8a438037d 100644 --- a/src/utils/props.js +++ b/src/utils/props.js @@ -92,6 +92,11 @@ export const makePropsConfigurable = (props, componentKey) => // against in `hasPropFunction()` const configurablePropDefaultFnName = makePropConfigurable({}, '', '').default.name +console.log('configurablePropDefaultFnName', configurablePropDefaultFnName) + // Detect wether the given value is currently a function // and isn't the props default function -export const hasPropFunction = fn => isFunction(fn) && fn.name !== configurablePropDefaultFnName +export const hasPropFunction = fn => { + console.log('hasPropFunction', isFunction(fn), fn.name) + return isFunction(fn) && fn.name !== configurablePropDefaultFnName +} From 1d32b628e2f32223e6b5dff3fdaecc9afdb92f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Fri, 22 Jan 2021 10:53:17 +0100 Subject: [PATCH 6/7] Update props.js --- src/utils/props.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/utils/props.js b/src/utils/props.js index 6d8a438037d..26f15df833a 100644 --- a/src/utils/props.js +++ b/src/utils/props.js @@ -92,11 +92,7 @@ export const makePropsConfigurable = (props, componentKey) => // against in `hasPropFunction()` const configurablePropDefaultFnName = makePropConfigurable({}, '', '').default.name -console.log('configurablePropDefaultFnName', configurablePropDefaultFnName) - // Detect wether the given value is currently a function // and isn't the props default function -export const hasPropFunction = fn => { - console.log('hasPropFunction', isFunction(fn), fn.name) - return isFunction(fn) && fn.name !== configurablePropDefaultFnName -} +export const hasPropFunction = fn => + isFunction(fn) && fn.name && fn.name !== configurablePropDefaultFnName From 9b4dd5aa38eeb74c1a93f3c8ba0fdab2df4dedf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Fri, 22 Jan 2021 10:53:53 +0100 Subject: [PATCH 7/7] Update form-text.js --- src/mixins/form-text.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/mixins/form-text.js b/src/mixins/form-text.js index 02736acf680..87ddf67b160 100644 --- a/src/mixins/form-text.js +++ b/src/mixins/form-text.js @@ -102,7 +102,6 @@ export const formTextMixin = Vue.extend({ }, watch: { [MODEL_PROP_NAME](newValue) { - console.log('form-text: watch value', newValue) const stringifyValue = toString(newValue) const modifiedValue = this.modifyValue(newValue) if (stringifyValue !== this.localValue || modifiedValue !== this.vModelValue) { @@ -150,7 +149,6 @@ export const formTextMixin = Vue.extend({ return value }, updateValue(value, force = false) { - console.log('form-text: updateValue', value) const { lazy } = this if (lazy && !force) { return @@ -199,9 +197,7 @@ export const formTextMixin = Vue.extend({ return } const { value } = event.target - console.log('form-text: onInput', event.target, value) const formattedValue = this.formatValue(value, event) - console.log('form-text: onInput', formattedValue) // Exit when the `formatter` function strictly returned `false` // or prevented the input event /* istanbul ignore next */ @@ -216,7 +212,6 @@ export const formTextMixin = Vue.extend({ onChange(event) { const { value } = event.target const formattedValue = this.formatValue(value, event) - console.log('form-text: onChange', formattedValue) // Exit when the `formatter` function strictly returned `false` // or prevented the input event /* istanbul ignore next */ @@ -233,7 +228,6 @@ export const formTextMixin = Vue.extend({ // on mobile browsers (e.g. caused by autocomplete) const { value } = event.target const formattedValue = this.formatValue(value, event, true) - console.log('form-text: onBlur', formattedValue) if (formattedValue !== false) { // We need to use the modified value here to apply the // `.trim` and `.number` modifiers properly pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy