Title: Bug in wcff-client.js
Last modified: January 2, 2019

---

# Bug in wcff-client.js

 *  [tazziedave](https://wordpress.org/support/users/tazziedave/)
 * (@tazziedave)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bug-in-wcff-client-js/)
 * At line 41:
 *     ```
       /* Key down event handler - for ESC key 
        * If pressed the editor window will be closed */
       $(window).on("keydown", function(e) {
           var keyCode = (event.keyCode ? event.keyCode : event.which);   
           var editor = $("div.wccpf-cart-edit-wrapper");
           if (keyCode === 27 && editor.length > 0) {
               editor.closest("ul.wccpf-cart-editor-ul").addClass("wccpf-is-editable-yes");
               editor.prev().show();
               editor.remove();
           }
       });
       ```
   
 * Should be
 *     ```
       /* Key down event handler - for ESC key
        * If pressed the editor window will be closed */
       $(window).on("keydown", function(e) {
           var keyCode = (e.keyCode ? e.keyCode : e.which);
           var editor = $("div.wccpf-cart-edit-wrapper");
           if (keyCode === 27 && editor.length > 0) {
               editor.closest("ul.wccpf-cart-editor-ul").addClass("wccpf-is-editable-yes");
               editor.prev().show();
               editor.remove();
           }
       });
       ```
   
 * ie: event needs to be changed to e
    -  This topic was modified 7 years, 4 months ago by [tazziedave](https://wordpress.org/support/users/tazziedave/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Saravana Kumar K](https://wordpress.org/support/users/mycholan/)
 * (@mycholan)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bug-in-wcff-client-js/#post-11071695)
 * Rookie mistake 🙂 thanks for posting, really appriciate it.
 * will update it.

Viewing 1 replies (of 1 total)

The topic ‘Bug in wcff-client.js’ is closed to new replies.

 * ![](https://ps.w.org/wc-fields-factory/assets/icon-128x128.jpg?rev=2738843)
 * [WC Fields Factory](https://wordpress.org/plugins/wc-fields-factory/)
 * [Support Threads](https://wordpress.org/support/plugin/wc-fields-factory/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-fields-factory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-fields-factory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-fields-factory/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Saravana Kumar K](https://wordpress.org/support/users/mycholan/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/bug-in-wcff-client-js/#post-11071695)
 * Status: not resolved