Skip to content
This repository has been archived by the owner on Mar 10, 2019. It is now read-only.

LPMultiLineTextField consumes all key events #19

Open
BlairDuncan opened this issue Aug 25, 2010 · 6 comments
Open

LPMultiLineTextField consumes all key events #19

BlairDuncan opened this issue Aug 25, 2010 · 6 comments

Comments

@BlairDuncan
Copy link
Contributor

Once a LPMultiLineTextField is activated, it continues to consume all key events even when not active.

From what I understand, the method "performKeyEquivalent" should by default return NO and only YES if the key was acted on.

Actually I'm not even sure if it needs to be there at all, I don't notice any difference with it completely removed.

@luddep
Copy link
Owner

luddep commented Sep 3, 2010

So, I believe this is there to not swallow events such as cmd+c.

This seems like a bug where it just doesn't resign first responder appropriately, and should be fixed elsewhere.

@appden
Copy link

appden commented Oct 14, 2010

Cappuccino will do the right thing, it took me an hour to figure out that LPMultiLineTextField was passing all events along to the browser. It's mere presence on the page royally screws key events everywhere with this method. This method is meant for assigning keyboard shortcuts to things like buttons.

@luddep
Copy link
Owner

luddep commented Oct 15, 2010

I can't reproduce those problems, but if anyone produces a fix I'll merge them in right away.

@appden
Copy link

appden commented Oct 15, 2010

If you have undo/redo in your menubar, the keyboard shortcuts will not work when LPMultiLineTextField (MLTF) is on the page because implementing performKeyEquivalent on MLTF and always returning YES is effectively saying that it will always handle any keyboard shortcuts on the page.

The fix is simply removing that method. :)

@eventualbuddha
Copy link

I'm having the same issue. I put together a really simple app demonstrating the issue. I confirmed that removing performKeyEquivalent: fixes the issue.

http://dl.dropbox.com/u/40652/LPMultilineTextField-tabbing-problem/index.html

@eventualbuddha
Copy link

Here's my pull request that fixes it: #35

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

No branches or pull requests

4 participants