diff --git a/scripts/appConfig.ts b/scripts/appConfig.ts index 7a5a2132e4..1f02fc39d3 100644 --- a/scripts/appConfig.ts +++ b/scripts/appConfig.ts @@ -46,7 +46,7 @@ export const debugInfo = { translationsLoaded: false, }; -export let authoringReactEnabledUserSelection = (JSON.parse(localStorage.getItem('auth-react') ?? 'false') as boolean); +export let authoringReactEnabledUserSelection = true; export function toggleAuthoringReact(enabled: boolean) { localStorage.setItem('auth-react', JSON.stringify(enabled)); diff --git a/scripts/core/ui/components/drop-zone-3.tsx b/scripts/core/ui/components/drop-zone-3.tsx index 49b4979ebc..7d718397fb 100644 --- a/scripts/core/ui/components/drop-zone-3.tsx +++ b/scripts/core/ui/components/drop-zone-3.tsx @@ -19,29 +19,23 @@ interface IState { } export class DropZone3 extends React.PureComponent { - private elem: React.RefObject; private input: React.RefObject; constructor(props) { super(props); - this.elem = React.createRef(); this.input = React.createRef(); - this.onDragStart = this.onDragStart.bind(this); this.onDragEnd = this.onDragEnd.bind(this); this.onDrop = this.onDrop.bind(this); this.onDropOver = this.onDropOver.bind(this); + this.onDragLeave = this.onDragLeave.bind(this); this.state = { dragging: false, }; } - onDragStart() { - this.setState({dragging: true}); - } - onDragEnd() { this.setState({dragging: false}); } @@ -53,25 +47,18 @@ export class DropZone3 extends React.PureComponent { + e.preventDefault(); + this.setState({dragging: true}); + }} + onDragLeave={(e) => { + e.preventDefault(); + this.setState({dragging: false}); + }} + onDragEnd={this.onDragEnd} + onDrop={this.onDrop} className={this.props.className} - ref={this.elem} style={styles} > {