Comments (1)
Hey @Quadric
I have the JavaScript not sending updates in the Wagtail admin when the live preview iframe is closed. My thinking was: if the iframe is closed the server shouldn't need to support requests it's not going to use. But I hadn't thought about the livepreview in a new window situation.
I'd like to stick to my original idea of not sending requests to the server if the iframe is closed, but adding livepreview window support is definitely important. I think there could be a very simple solution; it could be as easy as a file or simple query lookup. My idea is.. if someone clicked the Live Preview button it will open a new tab — it could also send a request to the server to create a file (or table row) to mark the page as "currently in live preview window". When that flag is active, the JavaScript could continue to send updates to the server even if the iframe is closed. The flag would need an active-until timestamp that's no more than 1 minute a head of right now, this way when the livepreview window is closed (and there isn't JavaScript support to detect when the window is closed) and the iframe is also closed, it doesn't keep sending requests to the server.
That's just my initial idea ¯_(ツ)_/¯ Im happy to discuss other ideas or improvements though! And I'm also happy to take PRSs!
from wagtail-livepreview.
Related Issues (12)
- request.site is None in live_preview HOT 1
- Even when LIVEPREVIEW_USE_FILE_RENDERING is set to False - application tries to create a folder HOT 1
- Integrate with headless preview
- The livepreview panel is not authorized to connect ? HOT 3
- Not compatible to Django 3 HOT 3
- request.site will not exist
- 2.10 migration HOT 1
- Live preview is removing script tags HOT 1
- Livepreview doesn't get the correct language using wagtailtrans
- Add options to hide and disable livepreview window
- Can't delete a page because of an IntegrityError
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wagtail-livepreview.