mirror of
https://github.com/chinchang/web-maker.git
synced 2025-05-11 12:55:22 +02:00
Merge pull request #502 from chinchang/v5-fix-443
(v5) fix detached preview not working in Files mode and some nits
This commit is contained in:
commit
2863d1296b
@ -3,7 +3,7 @@
|
||||
"version": "4.2.0",
|
||||
"description": "A blazing fast & offline web playground",
|
||||
"scripts": {
|
||||
"start": "npm run -s dev",
|
||||
"start": "concurrently --kill-others \"gulp start-preview-server\" \"npm run -s dev\"",
|
||||
"build": "preact build --template src/index.html --prerender false",
|
||||
"dev": "preact watch --template src/index.html",
|
||||
"serve-website": "cd packages/website; npm start",
|
||||
@ -41,6 +41,7 @@
|
||||
"babel-eslint": "^7.2.3",
|
||||
"babel-minify": "^0.2.0",
|
||||
"babel-plugin-macros": "^2.6.1",
|
||||
"concurrently": "^7.0.0",
|
||||
"eslint": "^4.9.0",
|
||||
"eslint-config-prettier": "^2.3.0",
|
||||
"eslint-config-synacor": "^2.0.2",
|
||||
|
@ -31,7 +31,7 @@ const Modal = ({
|
||||
useEffect(() => {
|
||||
window.addEventListener('keydown', onKeyDownHandler);
|
||||
return () => {
|
||||
window.removeEventListener('keydown', this.onKeyDownHandler.bind(this));
|
||||
window.removeEventListener('keydown', onKeyDownHandler.bind(this));
|
||||
if (focusGrabberRef.current) {
|
||||
focusGrabberRef.current.remove();
|
||||
focusGrabberRef.current = null;
|
||||
|
@ -9,7 +9,7 @@ window.addEventListener('message', e => {
|
||||
frame.contentDocument.close();
|
||||
}, 10);
|
||||
}
|
||||
if (e.data && e.data.url && e.data.url.match(/preview\.html/)) {
|
||||
if (e.data && e.data.url && e.data.url.match(/index\.html/)) {
|
||||
document.querySelector('iframe').src = e.data.url;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user