Open BlairDuncan opened 14 years ago
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.
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.
I can't reproduce those problems, but if anyone produces a fix I'll merge them in right away.
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. :)
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
Here's my pull request that fixes it: https://github.com/luddep/LPKit/pull/35
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.