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

apostrophe-schemas

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apostrophe-schemas - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

2

package.json
{
"name": "apostrophe-schemas",
"version": "0.1.8",
"version": "0.1.9",
"description": "Schemas for easy editing of properties in Apostrophe objects",

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

@@ -423,2 +423,18 @@ function AposSchemas() {

};
// A convenience allowing you to scroll to the first error after
// convertFields reports an error. Not called automatically.
self.scrollToError = function($el) {
var $element = $el.find('.apos-error');
if (!$element.length) {
return;
}
var offset = $element.offset();
var scrollTop = offset.top - 100;
$('html, body').scrollTop(scrollTop);
var $input = $element.find('input');
if ($input.length) {
$input.focus();
}
};
}

@@ -425,0 +441,0 @@

@@ -125,4 +125,8 @@ # apostrophe-schemas

The field in question must not be empty.
If `schemas.convertFields` does pass an error, you may invoke:
`aposSchemas.scrollToError($el)`
To ensure that the first error in the form is visible. Errors are indicated by the presence of the `apos-error` class on the fieldset for a particular element, which you may apply yourself if doing custom validation independent of `convertFields`.
#### Preventing Autocomplete

@@ -129,0 +133,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