react-native-webview-autoheight icon indicating copy to clipboard operation
react-native-webview-autoheight copied to clipboard

when Using <!DOCTYPE html> the height is not calculated correctly

Open samridhgupta opened this issue 8 years ago • 1 comments

If i am providing the source Html in the form of

<html id="htmlContent">
        <p>
            <span>{content} </span> 
        </p>
    </html>

the Webview component is able to render the content with correct height.

but if the source Html is

<!DOCTYPE html>
<html id="htmlContent">
        <p>
            <span>{content} </span> 
        </p>
    </html>

the Height is not calulated correctly and while rendered content is clipped in iOS only.

In addition, i m also using Katex to render the content to mathematical symbols. So if I m not using <!DOCTYPE html> then the rendering fraction lines are not rendered properly on both iOS and Android.

is there any fix for iOS webview which works fines even when the <!DOCTYPE html> is used.

any need on this issue would be grateful.

samridhgupta avatar Aug 21 '17 12:08 samridhgupta

@samridhgupta I think it'd be because of is not a valid xml. needs to be a valid closing tag to render. While it works proper if passed a URL instead of HTML. Been a while I've worked on this. Could you check few test cases if you find the bug?

scazzy avatar Oct 27 '17 06:10 scazzy