The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

bbradley (5) [Avatar] Offline
#1
Both the original and refactored TextSuggests submit when you select an item with the enter key, how can I stop this? I thought we were catching the enter key, and preventing that with multiple fields. I even added one more field just in cast, with a total of three, but its still submitting.

It happens in both IE and Firefox. Thanks.
Pascarello (208) [Avatar] Offline
#2
Re: Test Suggest Submit on Enter
You can add a return false to the line that looks for enter.

I am going to try to work on the autocomplete control this weekend since it has some issues.

Eric
bbradley (5) [Avatar] Offline
#3
Re: Test Suggest Submit on Enter
isn't it already doing that though?

if(intKey == 13){
GrabHighlighted();
theTextBox.blur();
return false;
}
lenning (3) [Avatar] Offline
#4
Re: Test Suggest Submit on Enter
Any progress on this question?

It seems the form's submit function is handling the Enter keypress event before this element sees it. My form tries to submit, but because of error checking it fails. Then my textfield is populated with the item I have selected. I think only then is the "false" returned.
alexandr (1) [Avatar] Offline
#5
Re: Test Suggest Submit on Enter
I have the same problem with submiting form on Enter in IE, FF.