One additional piece of information: this seems like a bug.
If I remove the html anchor from the URL, so given a “a name=text” in the html, I don’t ask for “index.html#text”, but simply “index.html”, the web popup is correctly shown.
However, it seems that the weird images are related to an incorrect disposal of the popup. I don’t know how to remove them, I just wrote a simple listener:
local function listener( event )
local shouldLoad = true
local url = event.url
--print("url = " .. url)
-- Close the view
if 1 == string.find(url, "corona:close") then
-- Close the web popup
--native.cancelWebPopup()
shouldLoad = false
director:changeScene(contents.targetScene, "crossFade")
end
-- Error handler
if event.errorCode then
-- Error loading page
--print( "Error: " .. tostring(event.errorMessage))
shouldLoad = false
end
return shouldLoad
end
I tried to use native.cancelWebPopup(), but the simulator dies. Am I doing something I should avoid? [import]uid: 94362 topic_id: 23241 reply_id: 93037[/import]