ctf0 / Laravel-Media-Manager

A "Vuejs & Laravel" Media Manager With Tons of Features
MIT License
829 stars 179 forks source link

Remove initial file_selected event from modal #112

Closed Stefanovicc closed 4 years ago

Stefanovicc commented 4 years ago

Is your feature request related to a problem? Please describe. When the media manager is initiated from a modal, the first item is selected by default. This triggers the events like "File selected". This is or may not always be the wanted behavior. Especially in WYSIWYG editors this will trigger the event once the modal is initiated and once you have chosen your file, which results in two images (sometimes even three or four, but don't know why?)

Describe the solution you'd like Default file selection should be turned off once the media manager gets initiated from a modal

ctf0 commented 4 years ago

sorry for the late reply, btw the multi event firing is related to changing the file selection inside the manager which is expected.

am not sure about ur editor setup but using tinymce https://github.com/ctf0/Laravel-Media-Manager/wiki/Use-The-Manager-With-Any-WYSIWYG-Editor i only get one file path as expected.

at last regarding not selecting the first file on modal init, i dont want to change the default UX, however u r more than free to change that in ur copy using this.inModal