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

@khanacademy/wonder-blocks-core

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/wonder-blocks-core - npm Package Compare versions

Comparing version 2.7.0 to 2.7.1

25

components/clickable-behavior.js

@@ -75,2 +75,7 @@ // @flow

/**
* This should only be used by button.js.
*/
type?: "submit",
skipClientNav?: boolean,

@@ -376,4 +381,7 @@

safeWithNav = undefined,
href,
type,
} = this.props;
let shouldNavigate = true;
let canSubmit = true;

@@ -388,7 +396,22 @@ if (onClick) {

shouldNavigate = false;
canSubmit = false;
}
// Prevent navigation.
e.preventDefault();
if (!href && type === "submit" && canSubmit) {
let target = e.currentTarget;
while (target) {
if (target instanceof window.HTMLFormElement) {
const event = new window.Event("submit");
target.dispatchEvent(event);
break;
}
// All events should be typed as SyntheticEvent<HTMLElement>.
// Updating all of the places will take some time so I'll do
// this later - $FlowFixMe.
target = target.parentElement;
}
}
if (beforeNav) {

@@ -395,0 +418,0 @@ this.setState({waiting: true});

@@ -783,4 +783,7 @@ import React, { Component, createElement, createContext } from 'react';

_this$props6$safeWith = _this$props6.safeWithNav,
safeWithNav = _this$props6$safeWith === void 0 ? undefined : _this$props6$safeWith;
safeWithNav = _this$props6$safeWith === void 0 ? undefined : _this$props6$safeWith,
href = _this$props6.href,
type = _this$props6.type;
var shouldNavigate = true;
var canSubmit = true;

@@ -795,7 +798,24 @@ if (onClick) {

shouldNavigate = false;
} // Prevent navigation.
canSubmit = false;
}
e.preventDefault();
if (!href && type === "submit" && canSubmit) {
var target = e.currentTarget;
while (target) {
if (target instanceof window.HTMLFormElement) {
var event = new window.Event("submit");
target.dispatchEvent(event);
break;
} // All events should be typed as SyntheticEvent<HTMLElement>.
// Updating all of the places will take some time so I'll do
// this later - $FlowFixMe.
target = target.parentElement;
}
}
if (beforeNav) {

@@ -802,0 +822,0 @@ this.setState({

4

package.json
{
"name": "@khanacademy/wonder-blocks-core",
"version": "2.7.0",
"version": "2.7.1",
"design": "v1",

@@ -30,3 +30,3 @@ "publishConfig": {

"license": "MIT",
"gitHead": "483662a65071f7f5539a5a40adc9e6c22d441bf8"
"gitHead": "55971121a333453523295abfe7d582071588a44e"
}

Sorry, the diff of this file is too big to display

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