Broetchen1234 / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

Selectively enable copy/paste for iPhone 3.0 #145

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
iui.css currently uses "-webkit-user-select: none;" on the <body> tag which 
disables copy/paste 
everywhere in the page (except input fields)

We need to think about where it should be enabled (by default) and where it 
shouldn't.  Individual 
apps can always override default settings with CSS cascades.

Original issue reported on code.google.com by msgilli...@gmail.com on 18 Jun 2009 at 7:40

GoogleCodeExporter commented 9 years ago
There is also an issue with pasting into input fields on desktop safari.

I have detailed the steps needs to reproduce the issue and a possible solution 
in this thread: 
http://groups.google.co.nz/group/iphonewebdev/browse_thread/thread/e8804b12d7a05
3f2

Note that this javascript solution is not ideal because it will replace all 
text in the textfield whether it is 
selected or not, but it was the only way I could figure out how to get it to 
work.

Cheers,
Isaac

Original comment by isaackea...@gmail.com on 28 Jul 2009 at 10:56

GoogleCodeExporter commented 9 years ago
i don't understand, why should copy/paste be *enabled* selectively? shouldn't 
it be enabled by default and then 
disabled in a few select locations?

Original comment by lensov...@gmail.com on 19 Nov 2009 at 6:27

GoogleCodeExporter commented 9 years ago
@lensovetp - your approach may be better.  Either way, there needs to be a 
mechanism to control where 
copy/paste is enabled.  When copy/paste first came out it was creating 
usability issues in some apps, so that's 
why we added the above mentioned CSS.  

This Issue is the place to discuss the best solution or to upload your patch 
(or better yet link to your patch in a 
Mercurial clone on Google Code)

Original comment by msgilli...@gmail.com on 5 Feb 2010 at 4:48

GoogleCodeExporter commented 9 years ago
Made an interesting discovery by accident on this issue.

In the main iui.css, in the following section:

body > *:not(.toolbar) {
    display: none;
    position: absolute;
    margin: 0;
    padding: 0;
    left: 0;
    top: 45px;
    width: 100%;
    min-height: 372px;
}

if you change display:none to display:block, voila, you can paste just fine in 
input fields!
Of course, this has the unfortunate side-effect of breaking a lot of other iui 
functionality, but perhaps it will 
lend some insight into the the source of the problem and lead to a possible 
solution.  In the meantime, I am 
using this trick on some of my more simple iui pages.  Good luck with a 
permanent solution!

Original comment by shopwebs...@gmail.com on 18 Apr 2010 at 6:28