Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Parity injects inject.js to Dapps at invalid position in HTML #8529

Closed
axelchalon opened this issue May 2, 2018 · 1 comment
Closed

Parity injects inject.js to Dapps at invalid position in HTML #8529

axelchalon opened this issue May 2, 2018 · 1 comment
Assignees
Labels
F2-bug 🐞 The client fails to follow expected behavior. M8-dapp 💎 Decentralized applications.
Milestone

Comments

@axelchalon
Copy link
Contributor

Parity adds <script src="/parity-utils/inject.js"></script> to the HTML of dapps served on port 8545. However, this is added right at the beginning of the response, before <!DOCTYPE html>, and as such the doctype is ignored and the layout breaks (thanks @amaurymartiny for figuring it out!)

<script src="/parity-utils/inject.js"></script>
<!DOCTYPE html>
<html lang="en">
   <head>
      ...

https://github.com/paritytech/parity/blob/eec7364760e760c798e744bba7c05f2ae9dd700a/dapps/src/page/handler.rs#L101-L110

@axelchalon axelchalon added F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. M8-dapp 💎 Decentralized applications. and removed M4-core ⛓ Core client code / Rust. labels May 2, 2018
@axelchalon axelchalon self-assigned this May 3, 2018
@amaury1093
Copy link
Contributor

@jacogr Remember the mexican wave headaches?

Rendering invalid HTML is called quirks mode, and modifies the CSS layout behavior. Hence all the components flying around. Axel's PR should solve that pb.

@5chdn 5chdn added this to the 1.12 milestone May 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M8-dapp 💎 Decentralized applications.
Projects
None yet
Development

No branches or pull requests

3 participants