Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inplaceEditor Key Event Handlers #21

Open
gregorytmorgan opened this issue Nov 9, 2010 · 0 comments
Open

inplaceEditor Key Event Handlers #21

gregorytmorgan opened this issue Nov 9, 2010 · 0 comments

Comments

@gregorytmorgan
Copy link

v1.8.3

Not sure the key event handling is right. registerListeners() assigns the key listeners to the target container, not the form input element. See my patch below.

  • Add assignment of onkeydown event handler to form INPUT in createEditField().

    line: ~505 - this._keyHandler = this.checkForEscapeOrReturn.bind(this);

  • Prevent blur event caused by escape from triggering a submit

    line: ~512 - if (Event.KEY_ESC == e.keyCode) { this.handleFormCancellation(e); }



    line: ~555 - Event.observe(fld, 'keydown', this._keyHandler);

  • Remove key event handlers from target container handlers.

    line: ~932 - REMOVE THIS LINE ALTOGETHER - "keydown: 'checkForEscapeOrReturn',

-G

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant