ElkArte Community

Title: Add files two clicks promlem
Post by: gevv on November 01, 2015, 02:17:17 pm
Hi.

""Add files by dragging & dropping or selecting them"""  mause two click  taking up the browser 

(sometimes a single click)

https://yadi.sk/i/bo2o6a6RkAQmu
http://sendvid.com/cc7lu8ds
Title: Re: Add files two clicks promlem
Post by: Jorin on November 01, 2015, 04:09:13 pm
I don't understand.  :-[
Title: Re: Add files two clicks promlem
Post by: emanuele on November 01, 2015, 04:10:50 pm
What browser?
Title: Re: Add files two clicks promlem
Post by: gevv on November 02, 2015, 11:21:31 am
hi,
chrome 46.0.2490.80 m and  firefox  41.0.2
Title: Re: Add files two clicks promlem
Post by: emanuele on November 02, 2015, 05:21:37 pm
hmm... it looks like sometimes, for some reason, the click even is not attached to the "click here" thingy and doesn't fire when it should.
That's a rather odd bug I'd say.
I have no reliable way to reproduce it, it happened once after having cleaned my browser's cache, but after that, even clearing the cache again the problem didn't appear any more.
Can you try a "clear browser cache" you as well?
It may just be a bad cache file here on the site...
Title: Re: Add files two clicks promlem
Post by: gevv on November 03, 2015, 11:31:57 am
hi,

I try the problem continues

(+ other pc tested)
Title: Re: Add files two clicks promlem
Post by: emanuele on November 04, 2015, 01:56:57 pm
I'm kind of out of ideas... @Spuds do you have any idea why sometimes the event is not attached to the tag? :-\
What happens is that sometimes, the first time you click on the text to attach a new file, instead of opening the "pick a file" system dialog screen, the click is actually a click on the <a> tag with an href as # that brings the browser at the top of the page.
Title: Re: Add files two clicks promlem
Post by: Spuds on November 06, 2015, 11:12:48 am
That is caused by our 0 opacity input box (which is positioned on top of that input text) not exactly covering the text.

So if you click on the left side of what looks like a button, you actually miss the real (hidden) input select.  I think I fixed this in 1.1 and should backport it to 1.0.6.  But in the meantime open index.css and find the .drop_area_fileselect declaration.  In that there are two 160 values, change those to be 170 (yes one is a negative) and see if that fixes the behavior.
Title: Re: Add files two clicks promlem
Post by: emanuele on November 06, 2015, 12:29:27 pm
Ohhh...
It make sense.
But does that mean that the "clicking area" may break with different translations because the length of the "click here to attach" text may differ from language to language?
Title: Re: Add files two clicks promlem
Post by: Spuds on November 06, 2015, 01:01:38 pm
Yes ... we could use a js function to get the actual width of the "button" and then update the input CSS accordingly.
Title: Re: Add files two clicks promlem
Post by: Jorin on November 06, 2015, 04:15:43 pm
Quote from: emanuele – Ohhh...
It make sense.
But does that mean that the "clicking area" may break with different translations because the length of the "click here to attach" text may differ from language to language?

Didn't I mentioned this long time ago as a bug?
Title: Re: Add files two clicks promlem
Post by: emanuele on November 06, 2015, 04:20:51 pm
That's entirely possible. In fact it rang a bell when Spuds mentioned, but I was not quite sure... :(
Title: Re: Add files two clicks promlem
Post by: gevv on June 03, 2016, 08:53:40 am
Hi,

the problem continues
how do  disable "dragging dropping" option

Using the old system? 

(http://s33.postimg.org/6ewq8hx27/simsiz_1.png) (http://postimage.org/)

thanks
Title: Re: Add files two clicks promlem
Post by: emanuele on June 03, 2016, 01:45:41 pm
Change:
.drop_area_fileselect {
    position: absolute;
    margin-left: -8em;
to:
Code: [Select]
.drop_area_fileselect {
    position: absolute;
    margin-left: -9em;
and:
Code: [Select]
#chrome .drop_area_fileselect, #safari .drop_area_fileselect {
    padding-left: 160px;
to:
Code: [Select]
#chrome .drop_area_fileselect, #safari .drop_area_fileselect {
    padding-left: 180px;

That should tweak better the click and avoid that single letter out of the input area. ;)
Title: Re: Add files two clicks promlem
Post by: gevv on June 03, 2016, 02:39:20 pm
#chrome .drop_area_fileselect, #safari .drop_area_fileselect  ok change

not found

Code: [Select]
.drop_area_fileselect {
    position: absolute;
    margin-left: -8em;



existing

Code: [Select]
.drop_area_fileselect {
   cursor: pointer;
   margin-left: -160px;
   opacity: 0.0001;
   position: absolute;
   width: 160px;
}
Title: Re: Add files two clicks promlem
Post by: emanuele on June 03, 2016, 05:34:00 pm
I checked on this site forgetting it uses 1.1... :-[

Well, change margin-left to -180px, should do. ;)
Title: Re: Add files two clicks promlem
Post by: gevv on June 04, 2016, 10:11:08 am
Thank you @emanuele

topic solved :)