Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload dialog not work properly #2807

Closed
applibs opened this issue Dec 25, 2018 · 3 comments
Closed

Upload dialog not work properly #2807

applibs opened this issue Dec 25, 2018 · 3 comments
Assignees

Comments

@applibs
Copy link

applibs commented Dec 25, 2018

Upload dialog works bad.
Buttons of upload dialog are created by this code:
return $('<div class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only elfinder-tabstop elfinder-focus"><span class="ui-button-text">'+fm.i18n(caption)+'</span></div>')

When I click DIV it show me OS dialog to select file, but when I click SPAN which is text of button then nothing happen. So clicking into DIV is only small space between button text and button border. It must work on all button elemens DIV and SPAN.

@nao-pon
Copy link
Member

nao-pon commented Dec 25, 2018

@applibs I have tested the latest elFinder with the following browsers, but there is nothing wrong.

  • Edge 42.17134.1.0
  • Firefox 64.0
  • ie 11.472.17134.0
  • Chrome 71.0.3578.98
  • Opera 57.0.3098.106

@applibs
Copy link
Author

applibs commented Dec 25, 2018

On this code:

return $('<div class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only elfinder-tabstop elfinder-focus"><span class="ui-button-text">'+fm.i18n(caption)+'</span></div>')
					.append(form)
					.on('click', function(e) {
						if (e.target === this) {
							e.stopPropagation();
							e.preventDefault();
							input.trigger('click');
						}
					})
					.on('mouseenter mouseleave', function(e) {
						$(this).toggleClass(hover, e.type === 'mouseenter');
					});

and on this condition
if (e.target === this)

  • when I click text in span, e.target = span and this = div, condition never fire.
  • when I click into space between text and border then e.target = div and this = div, condition will fire and trigger click event.

@nao-pon
Copy link
Member

nao-pon commented Dec 26, 2018

@applibs I found a cause. Usually, the <form> element completely covers the <div> element, but this problem occurs if the <form> element is not completely covered under the influence of other style sheets. So I will fix this.

Thanks! 👍

@nao-pon nao-pon self-assigned this Dec 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants