1 | <html> |
---|
2 | <head> |
---|
3 | <title>iPad CKEditor Issue with $("body").on("touchstart") event listener</title> |
---|
4 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> |
---|
5 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script> |
---|
6 | <script type="text/javascript" src="http://ckeditor.com/apps/ckeditor/4.2/ckeditor.js?mr96es"></script> |
---|
7 | <script> |
---|
8 | $(function() { |
---|
9 | |
---|
10 | CKEDITOR.replace( "testInput", {}); |
---|
11 | |
---|
12 | // The bug appears when a touchstart event is attached to the document or "body". |
---|
13 | // Comment out the next line to hide the bug. |
---|
14 | $("body").on("touchstart", "#foo", function(){}); |
---|
15 | |
---|
16 | }); |
---|
17 | </script> |
---|
18 | |
---|
19 | </head> |
---|
20 | |
---|
21 | <body> |
---|
22 | <textarea id="testInput">On an iPad using a Safari or Chrome browser, try clicking within this text in several different places and typing in new content. Selection does not work when a $("body").on("touchstart") event is used.</textarea> |
---|
23 | </body> |
---|
24 | </html> |
---|