Idea Summary
When a page is created that has only one page item, the Submit when Enter pressed property does not function as expected for that page item. With the property is turned off, the page will still submit even if the developer has designated that it should not.
Use Case
As a workaround, developers need to either add custom JavaScript to the page or a dummy hidden page item (so that there are 2 on the page) so that the page does not submit when enter is pressed.
After speaking with Oracle Support, they have said that it is not a bug and that the HTML spec is being followed. But they have also provided a workaround that should not be necessary if the setting worked properly for a single page item on a page.
Oracle Support Recommendation:
Add a dynamic action "Prevent Enter Key" for this page item with the following settings:
Event = Key Press
Client Side Condition - Type = JavaScript
JavaScript Expression = this.browserEvent.keyCode===13
Preferred Solution (Optional)
No changes need to be made to the page designer, the declarative option that already exists should just work. During rendering of the page, if APEX sees the page only has one item and the Submit when Enter pressed property is turned off, HTML/JavaScript should be added to the page to prevent the page submitting when the item is focused on the page and Enter is pressed.
Other blog posts on the same topic
http://deneskubicek.blogspot.com/2008/06/textfield-item-submiting-page.html
https://blog.jaris.fi/apex/f?p=BLOG:READ:::NO::ARTICLE:2525800346147859
I have created a sample application on apex.oracle.com that demonstrates the issue:
