Closed JayWood closed 8 years ago
This has been tracked down to specifically the input.cmb2_upload_button.
IF, when the dialog is already open, you manipulate that element in any way ( change the tag type or remove the element entirely ), the media dialog becomes editable.
Here is the full code to see what I see:
jQuery( 'input' ).on( 'focus', function( evt ) { window.console.trace( 'Focus: ',evt ) } );
jQuery( 'input' ).on( 'blur', function( evt ) { window.console.trace( 'Blur: ',evt ) } );
jQuery( window ).on( 'click', function( evt ){ window.console.log( 'Current Focus: ',jQuery(':focus') ); window.console.trace( 'Click: ',evt ); } );
You'll need to drop this in your browser's console debug. For now, I'll continue to work on this, just wanted to report what was found.
If you use the
file
CMB2 field type, the modal window which pops up does not allow interaction with ANY input fields.Running this in your console shows that the element is in fact clicked:
jQuery( window ).on( 'click', function( evt ){ window.console.trace( evt ); } );
However, running this, shows the focus target is never changed:
jQuery( 'input' ).on( 'focus', function( evt ) { window.console.trace( evt ) } )
The focus target stays as
input.cmb2-upload-button.button
whereas the click target is correctly targeting the inputs.