How to make it so pressing enter doesn't cause the comment to post?

Allon Prooit Posted in Beginning Developers 5 years ago

Wanting to make it so that you can have multiple lines in the comments field. I have upgraded OssnComments to include a button for submitting the comments. Would like to make it so that when you press enter you get a break and can enter comments on successive lines. How do you do this? Any thoughts?

Replies
us Allon Prooit Replied 5 years ago

Thanks for the suggestions. Will check out the js file shortly. As for the button, I got the upgrade from Bansh33... He has a number of components for sale. You can reach him at [removed] ... If you want to see the button in action, check out my site... 3NCIRCLE N37WORK.

us Roman Lohov Replied 5 years ago

The thing is, you can disable enter post by setting js file to true(2 places).

if (e.shiftKey === false)

Only problem is when you post the

lol
lol

it will show as:

lol lol

Just play arond that JS file.

us Roman Lohov Replied 5 years ago

What button did you create for submitting?

German Michael Zülsdorff Replied 5 years ago

I have no idea about your 'upgraded' OssnComments component...
Default OssnComments will add newlines on pressing Shift-Enter

us Roman Lohov Replied 5 years ago

Try removing .submit() from js file in OssnComments.

$('#comment-container-' + $container).submit();
Premium Version

Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.

$199 (Life Time)
Learn More

Other Questions