Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Μάθετε περισσότερα

Firefox for iOS does not fire a load event on an iframe element that does not have a src attribute.

  • 1 απάντηση
  • 1 έχει αυτό το πρόβλημα
  • 4 προβολές
  • Τελευταία απάντηση από Chris_D

more options

Our application utilises a rich text editor built around jQuery and unfortunately this implementation doesn't work in the iOS version of your Firefox browser:


var me = this; this.$content = $('<iframe style="width: 100%;" frameborder="0"></iframe>').load(function() { initFrame.call(me); });


The key problem here is the load event does not fire. And the load event does not fire here because the iframe has no "src" attribute. If I were to add a "src" attribute, e.g. just pointing to a blank html file, the load event does fire.

This behaviour is totally different from how we have come to expect it to work in other browsers. Chrome and Safari on iOS work as expected. All of the other desktop browsers work as expected, too, including Firefox. I haven't yet tested this on the Android version of iOS.

It's worth noting that the iframe element does not need to have a src attribute in the HTML5 spec. I've also noted that the behaviour doesn't change when adding the srcdoc attribute.

This is also an issue in the Dolphin browser on iOS. FWIW I have created a test case here:

https://xenresources.com/dolphin.html

Note, this should be a completely blank page regardless, but if you visit on Firefox on iOS, nothing will happen. If you visit using any other browser you should get an alert that reads:

"load event fired on iframe"

Our application utilises a rich text editor built around jQuery and unfortunately this implementation doesn't work in the iOS version of your Firefox browser: var me = this; this.$content = $('<iframe style="width: 100%;" frameborder="0"></iframe>').load(function() { initFrame.call(me); }); The key problem here is the load event does not fire. And the load event does not fire here because the iframe has no "src" attribute. If I were to add a "src" attribute, e.g. just pointing to a blank html file, the load event does fire. This behaviour is totally different from how we have come to expect it to work in other browsers. Chrome and Safari on iOS work as expected. All of the other desktop browsers work as expected, too, including Firefox. I haven't yet tested this on the Android version of iOS. It's worth noting that the iframe element does not need to have a src attribute in the HTML5 spec. I've also noted that the behaviour doesn't change when adding the srcdoc attribute. This is also an issue in the Dolphin browser on iOS. FWIW I have created a test case here: https://xenresources.com/dolphin.html Note, this should be a completely blank page regardless, but if you visit on Firefox on iOS, nothing will happen. If you visit using any other browser you should get an alert that reads: "load event fired on iframe"

Τροποποιήθηκε στις από το χρήστη Chris_D

Όλες οι απαντήσεις (1)

more options

I created a BugZilla report so this question can be closed if desired.

https://bugzilla.mozilla.org/show_bug.cgi?id=1263584