Skip to content

Conflicts with new Chrome Keyboard lock API #75

@derwaldgeist

Description

@derwaldgeist

Since build 68, the Chrome browser supports the W3C Keyboard lock specification:

https://w3c.github.io/keyboard-lock/

This API defines a global Keyboard singleton object with the methods lock() and unlock().

Since cordova-plugin-keyboard is using the global namespace for its own Keyboard object, there's a conflict now. I noticed this because I was (naively) checking for

if (typeof Keyboard === 'function')

in my code to detect the Cordova plugin. But since Chrome 68, this check will always be true (and broke my app, because I was calling Keyboard.hide() which is not part of Chrome's lock API.

I think it would be best if this plugin wouldn't clutter the global namespace at all, if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions