xtform icon indicating copy to clipboard operation
xtform copied to clipboard

Tooltips left behind

Open DrEvilMonkey opened this issue 9 years ago • 2 comments

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.

DrEvilMonkey avatar Dec 29 '15 02:12 DrEvilMonkey

I've seen this problem, but @refactorthis has been away for sometime now, so I don't know if this will be fixed soon.

idreeshaddad avatar Dec 29 '15 17:12 idreeshaddad

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.

alecgibson avatar Mar 01 '16 17:03 alecgibson