UNPKG

quasar

Version:

Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time

13 lines (12 loc) 331 B
export default function (onInput) { return function onComposition (e) { if (e.type === 'compositionend' || e.type === 'change') { if (e.target.qComposing !== true) return e.target.qComposing = false onInput(e) } else if (e.type === 'compositionstart') { e.target.qComposing = true } } }