Tested on Safari Version 11.0.3 (13604.5.6) under MacOS Version 10.13.3 (17D102) Description: Having nested tables inside iframe with contenteditable="true" hang the browser. CPU consumption reach 100% and page stop responding. 1. Open sample: https://codepen.io/msamsel/pen/qoqMpd or create html page with code mentioned below 2. Click into table 3. Wait around 5 seconds and try to click somewhere else. Actual result: Browser hangs and became not responding Please take a look into attached video. I add activity monitor showing how CPU consumption start to reach 100%. --- HTML CODE --- <!doctype html> <html lang='en'> <head> <meta charset="utf-8"> <title>TEST PAGE</title> </head> <body> <iframe width="100" height="100" srcdoc='<!doctype html><html><head><title>Editor</title></head><body><table border="1"><tr><td><table border="1"><tr><td><table border="1"><tr><td></td></tr></table></td></tr></table></td></tr></table></body></html>'></iframe> </body> </html>
Created attachment 336039 [details] Video shown CPU consumption during bug
I can reproduce with the codepen.io link, but not with the posted HTML code saved to a local file. It's spinning in editing code (WebPage::didChangeSelection->WebPage::editorState->WebPage::platformEditorState->Editor::stringForCandidateRequest).
<rdar://problem/38812455>
We are also seeing this issue in TinyMCE, the editor freezes with nested tables. Here is an issue on out bug tracker regarding it: https://github.com/tinymce/tinymce/issues/3995