JavaScript for WordPress › Forums › Vanilla JavaScript › vanillapress 1.6.17 on firefox › Reply To: vanillapress 1.6.17 on firefox
May 15, 2017 at 1:50 am
#27493
Zac Gordon
Keymaster
This should work:
editor.updateContent = function( event ) {
event.preventDefault();
model.updateContent( editor.currentContent );
};
Some folks like to do this:
editor.updateContent = function( e ) {
e.preventDefault();
model.updateContent( editor.currentContent );
};
I will go back when I have some time and update some of the early event stuff to talk more about cross browser support and reasons for this.