Enter key action on mobiscroll.popup

Hey everyone,

I’m using mobiscroll.popup to trigger an input field inside the popup.

That is working great, when i click my input field, the popup comes up with the input field in it, and then focus is triggered on the input field which brings up the android keyboard. This all works good.

Problem occurs when the user clicks the “enter” button (looks like a checkmark on SwiftKey’s keyboard). When this happens it just closes the whole thing and the SET is not triggered. What do I need to do to have my “onSet” action happen when the user hits that ENTER key on the keyboard instead of hitting the SET button in the mobiscroll popup? Is there a way to do this with Android? I’m using apache cordova, with mobiscroll jquery. See screenshot.

Answered this one myself! So in case anyone else has this issue, here is how it’s done:

    onBeforeClose: function (event, inst) {
		if (event.button === "set") {
			// do your thing here