mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-14 14:41:28 +00:00
Fixed: backspace on a none editable/enable field trigger the browser's page back button
Previously, when hitting the backspace key on a none editable/enable field, this triggered the browser's back button. Now it does not anymore. All credits for @apajarita Fixed #2189
This commit is contained in:
@@ -981,6 +981,9 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
|
||||
|
||||
- (void)keyDown:(CPEvent)anEvent
|
||||
{
|
||||
if (!([self isEnabled] && [self isEditable]))
|
||||
return;
|
||||
|
||||
// CPTextField uses an HTML input element to take the input so we need to
|
||||
// propagate the dom event so the element is updated. This has to be done
|
||||
// before interpretKeyEvents: though so individual commands have a chance
|
||||
|
||||
Reference in New Issue
Block a user