Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #528 from ipfs-shipyard/fix/linkify-tree-check
Linkify fix to run safety checks on entire parent tree ## Background Linkify is an opt-in experiment on _Preferences_ screen: https://ipfs.io/ipfs/QmY1D42peN9oPCoEeFezKR2jWKReDnJek52zcj7pcXXaaH ## In This PR A lot of web-based text editors create elaborate DOM trees and together with @lgierth we've experienced it first hand that it is not enough to check if parent is safe for linkification. This change walks back over entire parent tree to ensure none of parents has a no-go flag for linkification (eg. HTMLElement.contentEditable property) Test pages: - https://ipfs.io/ipfs/bafybeidvtwx54qr44kidymvhfzefzxhgkieigwth6oswk75zhlzjdmunoy/linkify-demo.html - https://hackmd.io/kMlFFc_bQoiabAul5RjYag?both# - Left pane (editor) will be ignored after this PR is merged. Right now, if multiple people edit the same line, content gets destroyed.
- Loading branch information