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

bobril

Package Overview
Dependencies
Maintainers
1
Versions
315
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bobril - npm Package Compare versions

Comparing version 17.9.0 to 17.10.0

4

CHANGELOG.md
# CHANGELOG
## 17.10.0
Improved `shouldBeFocusVisible()`.
## 17.9.0

@@ -4,0 +8,0 @@

2

package.json
{
"name": "bobril",
"version": "17.9.0",
"version": "17.10.0",
"description": "Component Oriented MVC Framework with virtual DOM and CSS",

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

@@ -617,3 +617,25 @@ import {

let lastInteractionWasKeyboard = false;
const inputTypesWithPermanentFocusVisible =
/te(l|xt)|search|url|email|password|number|month|week|(date)?(time)?(-local)?/i;
function hasAlwaysFocusVisible(element: typeof document.activeElement): boolean {
if (element == null) {
return false;
}
if (
element.tagName == "INPUT" &&
inputTypesWithPermanentFocusVisible.test((element as HTMLInputElement).type) &&
!(element as HTMLInputElement).readOnly
) {
return true;
}
if (element.tagName == "TEXTAREA" && !(element as HTMLTextAreaElement).readOnly) {
return true;
}
return (element as HTMLElement).isContentEditable;
}
addEvent(bustingEventNames[0], 2, () => {

@@ -624,4 +646,6 @@ lastInteractionWasKeyboard = false;

addEvent("keydown", 2, () => {
lastInteractionWasKeyboard = true;
addEvent("keydown", 2, (ev) => {
if (!ev.metaKey && !ev.altKey && !ev.ctrlKey) {
lastInteractionWasKeyboard = true;
}
return false;

@@ -631,3 +655,3 @@ });

export function shouldBeFocusVisible() {
return lastInteractionWasKeyboard;
return lastInteractionWasKeyboard || hasAlwaysFocusVisible(document.activeElement);
}
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