diff --git a/src/components/inputnumber/InputNumber.vue b/src/components/inputnumber/InputNumber.vue index 542731b11..8a338349b 100755 --- a/src/components/inputnumber/InputNumber.vue +++ b/src/components/inputnumber/InputNumber.vue @@ -820,7 +820,7 @@ export default { }, computed: { containerClass() { - return ['p-inputnumber p-component', this.class, { + return ['p-inputnumber p-component p-inputwrapper', this.class, { 'p-inputwrapper-filled': this.filled, 'p-inputwrapper-focus': this.focused, 'p-inputnumber-buttons-stacked': this.showButtons && this.buttonLayout === 'stacked', diff --git a/src/components/tooltip/Tooltip.js b/src/components/tooltip/Tooltip.js index a1c21b26b..adbf4afb3 100755 --- a/src/components/tooltip/Tooltip.js +++ b/src/components/tooltip/Tooltip.js @@ -236,25 +236,33 @@ function isOutOfBounds(el) { return (targetLeft + width > viewport.width) || (targetLeft < 0) || (targetTop < 0) || (targetTop + height > viewport.height); } +function getTarget(el) { + return DomHandler.hasClass(el, 'p-inputwrapper') ? DomHandler.findSingle(el, 'input'): el; +} + const Tooltip = { beforeMount(el, options) { - el.$_ptooltipModifiers = options.modifiers; - el.$_ptooltipValue = options.value; - bindEvents(el); + let target = getTarget(el); + target.$_ptooltipModifiers = options.modifiers; + target.$_ptooltipValue = options.value; + bindEvents(target); }, unmounted(el) { - remove(el); - unbindEvents(el); + let target = getTarget(el); + remove(target); + unbindEvents(target); - if (el.$_ptooltipScrollHandler) { - el.$_ptooltipScrollHandler.destroy(); - el.$_ptooltipScrollHandler = null; + if (target.$_ptooltipScrollHandler) { + target.$_ptooltipScrollHandler.destroy(); + target.$_ptooltipScrollHandler = null; } }, updated(el, options) { - el.$_ptooltipModifiers = options.modifiers; - el.$_ptooltipValue = options.value; - } + let target = getTarget(el); + target.$_ptooltipModifiers = options.modifiers; + target.$_ptooltipValue = options.value; + }, + }; export default Tooltip;