Changeset 595


Ignore:
Timestamp:
Jun 21, 2010, 11:09:52 AM (9 years ago)
Author:
duh
Message:
  • binding to window events resulted in strange behaviour
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web-app/js/disableKeys.js

    r588 r595  
    55    $('input:text').each(function() {
    66        $(this).bind('keypress', function(e) {
     7            console.log('inputbox keycode: '+e.keyCode);
    78            if (e.keyCode == 13) {
    89                return false;
     
    1011        });
    1112    });
    12 
    13     // handle browser window events
    14     $(window).bind('keypress', function(e) {
    15         // disable going back by pressing escape
    16         if (e.keyCode == 8) return false;
    17 
    18         // disable reload by pressing F4
    19         if (e.keyCode == 115) return false;
    20     });
    2113});
Note: See TracChangeset for help on using the changeset viewer.