Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
112
rated 0 times [  114] [ 2]  / answers: 1 / hits: 97930  / 13 Years ago, tue, august 16, 2011, 12:00:00

Here's the dilema, I have a webpage (only for android devices) and in that page I have an input box (a text box specifically) and when it gets focus the browser zooms in. I don't want it to zoom in - sounds easy, right?



Here's where it gets fun: I have to be able to zoom in general so don't say



<meta name='viewport' content='user-scalable=0'>


That won't work for me.



Also, the input box doesn't receive click events. It appears when another button is clicked a gets focus programmatically.



Here's what I've tried and they've failed so far:



jQuery('head meta[name=viewport]').remove();
jQuery('head').prepend('<meta name=viewport content=width=720px;intial-scale=1.0;maximum-scale=1.0;user-scalable=no />');
jQuery(#locationLock input).focus();
jQuery('head meta[name=viewport]').remove();
jQuery('head').prepend('<meta name=viewport content=width=720px;intial-scale=1.0;maximum-scale=1.0;user-scalable=yes />');


This also failed:



<input type='text' onfocus=return false>


And this:



jQuery(#locationLock input).focus(function(e){e.preventDefault();});


Any ideas?


More From » jquery

 Answers
31

Not possible!



I've got some bad news for you all. It's now been 6 months and no one has correctly answered the question.



Also I've finished working on that project and employer.



I'm afraid to say it, but exactly what I asked for is impossible. Sorry peoples. But I'm going to leave the question alive so people can see the other options.


[#90592] Sunday, August 14, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
joaquin

Total Points: 150
Total Questions: 103
Total Answers: 113

Location: Saint Helena
Member since Tue, Nov 3, 2020
4 Years ago
;