Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-virtual-keyboard

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-virtual-keyboard - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "electron-virtual-keyboard",
"version": "1.0.2",
"version": "1.0.3",
"description": "An electron based virtual keyboard. Uses electron's sendInputEvent api to implement a simple customizable soft keyboard.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -354,11 +354,16 @@ (function (factory) {

if ( this.config.autoPosition ) {
if ( this.config.autoPosition && typeof this.config.autoPosition != 'function' ) {
var offset = $('body').offset();
// figure out bottom center position of the element
var position = el.getBoundingClientRect();
}
var bounds = el.getBoundingClientRect();
var position = {
x: bounds.left + offset.left,
y: bounds.top + offset.top,
width: bounds.width,
height: bounds.height
}
if ( this.config.autoPosition ) {
var x = position.x + ((position.width - this.$container.width()) / 2);
var x = position.x + ((position.width - this.$container.width()) / 2);``
// keep container away from spilling outside window width
if ((x + this.$container.width()) > $(window).width) {
if ((x + this.$container.width()) > $(window).width()) {
x = $(window).width() - this.$container.width();

@@ -374,3 +379,3 @@ }

left: x
})
});
}

@@ -377,0 +382,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc