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

Select a file from mouse context menu not working #57

Closed
Fredericld opened this issue Jul 23, 2019 · 1 comment
Closed

Select a file from mouse context menu not working #57

Fredericld opened this issue Jul 23, 2019 · 1 comment

Comments

@Fredericld
Copy link

Hi,

I really like the file manager so well done!

Slight issue though, selecting a file to insert in a text field does not work when I click on "select" in the mouse context menu. It just does nothing. But if I double-click on the file, then it works and the filename gets inserted in the input field.

<div class="form-group">
	<label for="fav_icon">Favicon</label> 
	<input aria-describedby="button-image" placeholder="Favicon" name="fav_icon" type="text" value="/files/My Images/universe-2742113_1280.jpg" id="fav_icon" class="form-control"> 
	<div class="input-group-append">
		<button type="button" id="button-image" class="btn btn-outline-secondary">Select</button>
	</div>
</div>


@push('scripts')

	<script>
	document.addEventListener("DOMContentLoaded", function() {

	  document.getElementById('button-image').addEventListener('click', (event) => {
	    event.preventDefault();

	    window.open('/file-manager/fm-button', 'fm', 'width=1400,height=800');
	  });
	});

	// set file link
	function fmSetLink($url) {
	  document.getElementById('fav_icon').value = $url;
	}
	</script>

@endpush

This was tested in Chrome and Firefox. It could be a mistake I made but the fact the double-click works makes me believe something is not right

Thanks

@alexusmai
Copy link
Owner

Hi, thank you, I found the problem and fixed it. In a new version will be changes..

GabrieliusJokubauskas pushed a commit to loadsys/laravel-file-manager that referenced this issue Mar 20, 2023
Portuguese Brazilian Language Support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants