Bug 1941483 Comment 8 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

So the relevant JS is this function (abbreviated slightly by me to highlight the spots where its logic explicitly diverges based on the browser's UA string and how that impacts the sizing):
```JavaScript
    function iframeAutoFit()
    {
```
                    if (isSafari()) {
                        h1=ifrm.contentWindow.document.body.scrollHeight;
                    }
[...]

                    if(original != h || !chk){ 
                        if(isFireFox() == false)
                        {
                            if (chk) {
                                h1 = parseInt(h)+60;
                            }
                        
                            ifrm.style.height = ifrm.parentNode.style.height = h1 +"px";
                        }
                        else
                        {
                            if (chk) {
                                if ($.exists(popupDialog)) {
                                    h1 = parseInt(h) + 60;
                                } else {
                                    h1 = ifrm.contentDocument.body.scrollHeight;
                                    h1 = parseInt(h1) + 60;
                                }
                            }
                            
                            ifrm.height = h1;
                        }
```
That^ JS all lives in the source of the HTML at this URL:
https://aca-prod.accela.com/OAKLAND/login.aspx

(and for reference, "isFireFox" is defined as `navigator.userAgent.includes("Firefox");` in https://aca-prod.accela.com/OAKLAND/bundles/accela-common  )

In the isFireFox()-being-true case, that JS never sets `ifrm.style.height`, i.e .the iframe's height, so that's why the iframe remains short when we're using our default UA string.
So the relevant JS is this function (abbreviated slightly by me to highlight the spots where its logic explicitly diverges based on the browser's UA string and how that impacts the sizing):
```JavaScript
    function iframeAutoFit()
    {
[...]
                    if (isSafari()) {
                        h1=ifrm.contentWindow.document.body.scrollHeight;
                    }
[...]
                    if(original != h || !chk){ 
                        if(isFireFox() == false)
                        {
                            if (chk) {
                                h1 = parseInt(h)+60;
                            }
                        
                            ifrm.style.height = ifrm.parentNode.style.height = h1 +"px";
                        }
                        else
                        {
                            if (chk) {
                                if ($.exists(popupDialog)) {
                                    h1 = parseInt(h) + 60;
                                } else {
                                    h1 = ifrm.contentDocument.body.scrollHeight;
                                    h1 = parseInt(h1) + 60;
                                }
                            }
                            
                            ifrm.height = h1;
                        }
```
That^ JS all lives in the source of the HTML at this URL:
https://aca-prod.accela.com/OAKLAND/login.aspx

(and for reference, "isFireFox" is defined as `navigator.userAgent.includes("Firefox");` in https://aca-prod.accela.com/OAKLAND/bundles/accela-common  )

In the isFireFox()-being-true case, that JS never sets `ifrm.style.height`, i.e .the iframe's height, so that's why the iframe remains short when we're using our default UA string.
So the relevant JS is this function (abbreviated slightly by me to highlight the spots where its logic explicitly diverges based on the browser's UA string and how that impacts the sizing):
```JavaScript
    function iframeAutoFit()
    {
[...]
                    if (isSafari()) {
                        h1=ifrm.contentWindow.document.body.scrollHeight;
                    }
[...]
                        if(isFireFox() == false)
                        {
                            if (chk) {
                                h1 = parseInt(h)+60;
                            }
                        
                            ifrm.style.height = ifrm.parentNode.style.height = h1 +"px";
                        }
                        else
                        {
                            if (chk) {
                                if ($.exists(popupDialog)) {
                                    h1 = parseInt(h) + 60;
                                } else {
                                    h1 = ifrm.contentDocument.body.scrollHeight;
                                    h1 = parseInt(h1) + 60;
                                }
                            }
                            
                            ifrm.height = h1;
                        }
```
That^ JS all lives in the source of the HTML at this URL:
https://aca-prod.accela.com/OAKLAND/login.aspx

(and for reference, "isFireFox" is defined as `navigator.userAgent.includes("Firefox");` in https://aca-prod.accela.com/OAKLAND/bundles/accela-common  )

In the isFireFox()-being-true case, that JS never sets `ifrm.style.height`, i.e .the iframe's height, so that's why the iframe remains short when we're using our default UA string.
So the relevant JS is this function (abbreviated slightly by me to highlight the spots where its logic explicitly diverges based on the browser's UA string and how that impacts the sizing):
```JavaScript
    function iframeAutoFit()
    {
[...]
                    if (isSafari()) {
                        h1=ifrm.contentWindow.document.body.scrollHeight;
                    }
[...]
                        if(isFireFox() == false)
                        {
                            if (chk) {
                                h1 = parseInt(h)+60;
                            }
                        
                            ifrm.style.height = ifrm.parentNode.style.height = h1 +"px";
                        }
                        else
                        {
                            if (chk) {
                                if ($.exists(popupDialog)) {
                                    h1 = parseInt(h) + 60;
                                } else {
                                    h1 = ifrm.contentDocument.body.scrollHeight;
                                    h1 = parseInt(h1) + 60;
                                }
                            }
                            
                            ifrm.height = h1;
                        }
```
That^ JS all lives in the source of the HTML at this URL:
https://aca-prod.accela.com/OAKLAND/login.aspx

(and for reference, `isFireFox()` is defined as `navigator.userAgent.includes("Firefox");` in https://aca-prod.accela.com/OAKLAND/bundles/accela-common  )

In the isFireFox()-being-true case, that JS never sets `ifrm.style.height`, i.e .the iframe's height, so that's why the iframe remains short when we're using our default UA string.

Back to Bug 1941483 Comment 8