keyboard input is not possible.
eventjang opened this issue · 1 comments
Good morning.
We are creating a hybrid app using HTML.
I need the Notification function in my app, so I am developing it as Custom Notification provided by the library.
I added CEFSharp's WebView in Custom Notification.xaml, and it loads an HTML page.
There is a text input in the HTML page, but keyboard input is not possible.
I want to know what the cause is. Is there a way to fix it?
The thing is that the default behaviour of notifier is to block all input events which may interrupt notifications. Now it's possible to override this behaviour.
The code below or sample project CustomNotificationsExample in sources presents how to do that.
You can specify which sources of keyboard input events are allowed. You can also create your own handler, or use Delegate DelegatedInputEventHandler
_notifier = new Notifier(cfg =>
{
cfg.KeyboardEventHandler = new AllowedSourcesInputEventHandler(new []{ typeof(CustomInputDisplayPart) });
});