Search code examples
androidcordovaonsen-ui

enable select and copy in hybrid app [onsen ui]


I am developing a hybrid app using onsen ui, I want to enable the text select and copy feature which we see in the chrome app, long press the text to select it and copy them, i tried following code but that enables the text in browser not in the app.

Code

*:not(input):not(textarea):not(select) {
    -webkit-user-select: all;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

Solution

  • You should set all those properties to 'all', not just -webkit-user-select.

    *:not(input):not(textarea):not(select) {
        -webkit-user-select: all;
        -moz-user-select: all;
        -ms-user-select: all;
        user-select: all;
    }