This approach won't work any more since modern browsers (I have tested it with chrome) don't let you create additional shadow-root to input/textarea. More info here.
It works in Gmail for <div role="textbox"></div>, but after you press a key, the delegate loses its focus. Any idea why?