Focus on input type = "file"

  • hello allz, i have the same issue as the input text focus but this time it's with an input type ="file".
    works well on computer but when i use my iphone or android i can't click on my button. I need to use landscape iphone display to work, and same issue with ipad..doesn't work..
    i've try : to set it on autofocus by 3 way...

    1:

    Code
    inputelement.autofocus = "autofocus";


    It's set well autofocus on computer (i see the button select when it's loaded, but don't work on my iphone)


    2:

    Code
    inputelement.addEventListener('touchstart',file_click, false);
    function file_click()
    {
    inputelement.focus();
    }

    or these too :
    3:

    Code
    inputelement.addEventListener('touchstart',setfocus, false);
    
    
    	function setfocus(){	 if(arguments.length<1)return;	 if(arguments[0]==='true')inputelement.focus();	 else inputelement.blur();	}

    and other things but nothing work :/ on landscape it's ok !


    Another test with:

    5 Mal editiert, zuletzt von ChukA (15. Juni 2018 um 16:33)

  • it's ok then...
    i've created a layer who call my Js fonction...

    i don't know why the input "file" can't be clicked itself (but to be honest i don't care, 'cause i can put all style that i want to my layer :)), same issue with "checkbox" or "button".
    regards
    thread is close for me :)

    Thxxx

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!