diff --git a/src/animation/frontend.js b/src/animation/frontend.js index 882a3b364..5256b43cd 100644 --- a/src/animation/frontend.js +++ b/src/animation/frontend.js @@ -284,8 +284,9 @@ const isElementInViewport = ( el ) => { }; return ( - ( bounds.bottom >= viewport.top && bounds.bottom <= viewport.bottom ) || - ( bounds.top <= viewport.bottom && bounds.top >= viewport.top ) + ( bounds.bottom >= viewport.top && bounds.top <= viewport.bottom ) || // Element spans the viewport + ( bounds.top <= viewport.bottom && bounds.bottom >= viewport.bottom ) || // Top part of the element is in the viewport + ( bounds.bottom >= viewport.top && bounds.top <= viewport.top ) // Bottom part of the element is in the viewport ); }; diff --git a/src/blocks/blocks/form/edit.js b/src/blocks/blocks/form/edit.js index 780e7c119..b916fe396 100644 --- a/src/blocks/blocks/form/edit.js +++ b/src/blocks/blocks/form/edit.js @@ -1040,7 +1040,12 @@ const Edit = ({ className='wp-block-button__link' placeholder={ __( 'Submit', 'otter-blocks' ) } value={ attributes.submitLabel } - onChange={ submitLabel => setAttributes({ submitLabel }) } + onChange={ submitLabel => { + submitLabel = submitLabel.replace( //gi, ' ' ); + setAttributes({ submitLabel }); + } } + multiline={ false } + multiple={ false } tagName="button" type='submit' onClick={ e => e.preventDefault() } diff --git a/src/onboarding/store.js b/src/onboarding/store.js index d3f5df961..111e72b55 100644 --- a/src/onboarding/store.js +++ b/src/onboarding/store.js @@ -137,6 +137,7 @@ const actions = { if ( ! selectedTemplate ) { dispatch( actions.nextStep() ); + recordEvent( event ); return; }