This is quite difficult to explain, but I've never experienced something like this before. I've also created a GIF to display what the issue looks like.
The first time I open my chrome extension and make a search the iframe works perfectly fine. The second time I open my chrome extension and make a search the iframe disappears (see GIF).
As you can see the iframe suddenly disappears for no apparent reason, and if I right click and go into inspect element
and edit even the most unrelated item then all of a sudden the iframe reappears.
Is there a simple solution I can try? As I said when I toggle any piece of code in the inspect element
view in chrome it reappears.
Here is the code for searching: (I'm using jquery Autocomplete for the search)
$('#searchBox').autocomplete({
lookup: footballers,
lookupLimit: 5,
minChars: 3,
onSelect: function (suggestion) {
$("#searchBox").blur();
$('.fullcard').css('display', 'block');
$('.fullcard').append('<i id="closeCard" class="material-icons">close</i><iframe src="https://www.example.com/'+suggestion.data+'"></iframe>');
},
lookupFilter: _autocompleteLookup,
formatResult: _autocompleteFormatResult,
});
Any thoughts/ideas? Highly appreciate it.