xtform
xtform copied to clipboard
Tooltips left behind
There is a problem, I use the tooltip validation on a modal, after i submit the data and it is accepted i hide the modal, problem is tooltips are left behind for every field.
I've seen this problem, but @refactorthis has been away for sometime now, so I don't know if this will be fixed soon.
For a quick fix, comment out xtForm.js:458
:
//container: attrs.container || 'body'
(and remove the preceding comma)
This will stop xtForm from adding the tooltips to the body
element by default, and so they should disappear when when their input field disappears.
Alternatively, you could override this behaviour by adding the data-container
attribute to an element close to your input
element. NB: you can't set it to be the input directly, because input
cannot contain other DOM elements.