Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around bug involving fonts/DOM injection #513

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Work around bug involving fonts/DOM injection
Adding font before parent container has been added to DOM
crashes on pageload.

Error message is

TextArea.js:6 Uncaught TypeError: ea[v[((v[(a >> 2)] + 68) >> 2)]] is not a function
    at Ml (TextArea.js:6:1555)
    at Array.Sr (TextArea.js:6:9333)
    at qi (TextArea.js:5:252871)
    at Rp (TextArea.js:5:91855)
    at Module._main (TextArea.js:15:78841)
    at callMain (TextArea.js:15:81058)
    at doRun (TextArea.js:15:81455)
    at run (TextArea.js:15:81627)
    at runCaller (TextArea.js:15:80913)
    at removeRunDependency (TextArea.js:15:4729)
Ml	@	TextArea.js:6
Sr	@	TextArea.js:6
qi	@	TextArea.js:5
Rp	@	TextArea.js:5
Module._main	@	TextArea.js:15
callMain	@	TextArea.js:15
doRun	@	TextArea.js:15
run	@	TextArea.js:15
runCaller	@	TextArea.js:15
removeRunDependency	@	TextArea.js:15
applyMemoryInitializer	@	TextArea.js:15
xhr.onload	@	TextArea.js:1
load (async)
readAsync	@	TextArea.js:1
doBrowserLoad	@	TextArea.js:15
runMemoryInitializer	@	TextArea.js:15
receiveInstance	@	TextArea.js:15
receiveInstantiationResult	@	TextArea.js:15
Promise.then (async)
instantiateArrayBuffer	@	TextArea.js:15
instantiateAsync	@	TextArea.js:15
createWasm	@	TextArea.js:15
(anonymous)	@	TextArea.js:15
mmore500 committed Apr 18, 2024

Verified

This commit was signed with the committer’s verified signature.
mmore500 Matthew Andres Moreno
commit 6aa2e3ff7e7a14e4aca11460cf0db77b5e40d77a
11 changes: 6 additions & 5 deletions examples/web/TextArea.cpp
Original file line number Diff line number Diff line change
@@ -23,11 +23,6 @@ int main()
{
doc << "<h1>Testing!</h1>";

out1_font.SetColor("green");
out2_font.SetColor("blue");
text_reflect << out1_font;
text_reflect2 << out2_font;

text_area.SetCallback([](const std::string & in){
text_area.SetText("Changed!");
});
@@ -46,4 +41,10 @@ int main()
}, "Update" )
<< "<br>" << text_reflect
<< "<br><br>" << text_reflect2;

out1_font.SetColor("green");
out2_font.SetColor("blue");
text_reflect << out1_font;
text_reflect2 << out2_font;

}