fix: IE bug when we're uploading from an iframe#876
fix: IE bug when we're uploading from an iframe#876Nowadays wants to merge 1 commit intonervgh:masterfrom
Conversation
|
Just rechecked, this is an even worse edge case : We're actually using a modal which holds the input that uploads the files in an iframe. The issue is when you have a modal opened from the iframe BUT bound to the parent DOM (this is a technique to avoid weird issue with modal in iframes). The issue is only in IE, chrome yields true on Sorry for not mentionning the modal, I didn't even think about that at first. |
I uploaded a use case to demonstrate this problem: examples/issues/pr876 But the result is The picture below is the page I visited using IE11 browser, the button in the page opened a modal,there is an iframe in the modal box, there is an uploads input in the iframe, the final result is If I misunderstood what you meant, help improve this use case,thx. |


When using IE and iframes, if we upload a file from the iframe the File object is contructed using the window.parent.File, so checking value instanceof File yields false since it's the equivalent of doing value.constructor === window.File which also yields false since window.parent.File !== window.File
Note: if we're not in an iframe window.parent === window -> true, so no futher checking is necessary