Copy Paste Breaks for Embeded Pages in iframe

Hi,

I raised this issue with Apple sometime back and they acknowledged it as a bug 10060918.

I recently updated to IOS 5.1 to check if its fixed. So I wrote a sample code.

1.html

[code]

[/code]

2.html

[code]

Text area sampel text. [/code]

if I run this code and try to do copy paste in textarea everything works as expected. Now I just include touchui.js file to this code and do not make any other change and it does not work.

<html>

<head>
	<script src="codebase/touchui.js" type="text/javascript"></script>	
</head>

<body>
	<textarea rows="15" cols="80" id="ta">
	Text area sampel text.
	</textarea> 
</body>

</html>

I tried to add jquery.js and used bind api call to detecect copy, paste etc so I can override that but that too doesn’t work if code has touchui.js included. If I remove then jquery bind works too.

Please suggest.

Hi Stanislav,

Can you please confirm if this is an issue or am I doing something wrong.

Thanks

Update:

I added a dhx textarea to both pages.

dhx.ready(function(){dhx.ui({ id: 'app', view: 'layout', height: 200, width: 768, rows: [ { view: 'layout', type: 'wide', rows: [ { view: 'form', scroll: true, elements: [ { view: 'textarea', label: 'Textarea', popup: '', click: '', css: '', id: 'control_textarea_2'} ], id: 'form_2' } ], id: 'layout_2' } ] })})

next I pointed code to touchui_debug.js and updated the script adding onBlur=‘alert();’

.protoUI({ name:"textarea", defaults:{ template:function(config){ return "<textarea class='dhx_inp_textarea' onBlur='alert();' placeholder='"+(config.label||"")+"' style='' "+(config.readonly?"readonly='true' ":"")+">"+(config.value||"")+"</textarea>"; }, cssContant:16 },

Now I tried to paste text in dhx textarea on outer frame, it works and when I close the keyboard onBlur is also fired.

Next I tried the same with textarea in inner page, firstly paste doesn’t work nor is onBlur fired.

It looks like some issue with focus function. Can you please help verify this.

This seems to be a problem in iOS 8.* as well. I have one webview ( in my native iOS app) which shows textarea inside iFrame.When I try to copy paste on this text area , it doesn’t work.

Is there any Html/JS side solution for this problem? Is there any alternative to using multi-line text area control?

The last option I have kept is to implement a native solution to show my own custom menu when user long presses the webview.For this I need to trap the long press event on webview.This is a lengthy solution and will need lot of testing before making my native application live.

Hello,

Does the problem occurs only with dhtmlxTouch textarea ? Please check selection with native html textarea.