diff --git a/src/directives/focus.js b/src/directives/focus.js index ac5a5460e..11d016987 100644 --- a/src/directives/focus.js +++ b/src/directives/focus.js @@ -1,6 +1,6 @@ export default { // When the bound element is inserted into the DOM... - inserted: (el, {modifiers}) => { + mounted: (el, {modifiers}) => { // Focus the element only if the viewport is big enough // auto focusing elements on mobile can be annoying since in these cases the // keyboard always pops up and takes half of the available space on the screen. diff --git a/src/directives/tooltip.js b/src/directives/tooltip.js index ebcdd03d5..cfdf05cb4 100644 --- a/src/directives/tooltip.js +++ b/src/directives/tooltip.js @@ -22,7 +22,7 @@ const calculateArrowTop = (top, tooltip) => { const createdTooltips = {} export default { - inserted: (el, {value, modifiers}) => { + mounted(el, {value, modifiers}) { // First, we create the tooltip and arrow elements const tooltip = document.createElement('div') tooltip.style.position = 'fixed' @@ -74,7 +74,7 @@ export default { arrow: arrow, } }, - unbind: el => { + unmounted(el) { if (typeof createdTooltips[el] !== 'undefined') { createdTooltips[el].tooltip.remove() createdTooltips[el].arrow.remove()