• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ipad - keyboard opened on focusing textfield in iframe

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone,

I have strange problem with ipad - iframe textfield.

I have a iframe poinitng to google.com. And i defined document or body or parent level events on the html page. Now when i click google search textfield on ipad, keyboard is launched.After that if i touch anywhere on ipad to scroll webpage keyboard closes. Please find the html file in attachments - sample.html.

<html>
<head>

</head>
<body>
<iframe src="http://google.com
" width="700" height="700" scrolling="yes">

</iframe>
</body>
<script type="text/javascript">
function onF()
{
console.log('focus');
}
function onB()
{
console.log('blur');
}
document.ontouchmove = onF;
document.ontouchend = onB;
document.onmouseup = onB;
</script>
</html>



Interestingly if i remove document or body or parent level events and try the same scenario - touch anywhere on ipad will not close keyboard and it allows to scroll the web page. - sample1.html

<html>
<head>

</head>
<body>
<iframe src="http://google.com
" width="700" height="700" scrolling="yes">

</iframe>
</body>
<script type="text/javascript">
function onF()
{
console.log('focus');
}
function onB()
{
console.log('blur');
}
</script>
</html>



Can anyone explain me why it is behaving like this. Or provide a solution to stop keyboard not to close.

Thanks,
Sarath
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sarath, please CarefullyChooseOneForum. Your other thread with the same question has been locked.

edit Also, you apparently abandoned your earlier thread
https://coderanch.com/t/446732/Servlets/java/Session

Bad form, that.
 
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic