Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Revert "Bug 1157609 - If user taps enter key in add contact page, dev…
Browse files Browse the repository at this point in the history
…ice will add phone field automatically. Depends on Bug 809452 R=francisco"

This reverts commit 6c59150.
  • Loading branch information
KevinGrandon committed May 27, 2015
1 parent 677f20f commit 8e6a357
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions apps/communications/contacts/js/views/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,10 @@ contacts.Form = (function() {
var onNewFieldClicked = function onNewFieldClicked(evt) {
var type = evt.target.dataset.fieldType;
evt.preventDefault();
// Workaround until 809452 is fixed.
// What we are avoiding with this condition is removing / restoring
// a field when the event is simulated by a ENTER Keyboard click
if (evt.clientX !== 0 && evt.clientY !== 0) {
contacts.Form.insertField(type, null, [
'inserted',
'displayed'
]);
}
contacts.Form.insertField(type, null, [
'inserted',
'displayed'
]);
textFieldsCache.clear();
// For dates only two instances
if (type === 'date') {
Expand Down

0 comments on commit 8e6a357

Please sign in to comment.