mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
fix bug 320203, Respect the Gecko pref for browser.backspace_action
r=smorgan, sr=pinkerton, patch by Chris Lawson (bugzilla@chrislawson.net)
This commit is contained in:
parent
8cd0dd5030
commit
f1faf7d630
@ -112,3 +112,6 @@ pref("browser.tabs.loadInBackground", false);
|
||||
|
||||
// use the html network errors rather than sheets
|
||||
pref("browser.xul.error_pages.enabled", true);
|
||||
|
||||
// map delete key to back button
|
||||
pref("browser.backspace_action", 0);
|
||||
|
@ -2495,7 +2495,7 @@ enum BWCOpenDest {
|
||||
return isFocused;
|
||||
}
|
||||
|
||||
// map delete key to Back
|
||||
// map delete key to Back according to browser.backspace_action pref
|
||||
- (void)deleteBackward:(id)sender
|
||||
{
|
||||
// there are times when backspaces can seep through from IME gone wrong. As a
|
||||
@ -2503,11 +2503,17 @@ enum BWCOpenDest {
|
||||
// focused widget is a text field (<input type="text"> or <textarea>)
|
||||
if ([self isPageTextFieldFocused] || [self isPagePluginFocused])
|
||||
return;
|
||||
|
||||
if ([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask)
|
||||
[self forward:sender];
|
||||
else
|
||||
[self back:sender];
|
||||
|
||||
int deleteKeyAction = [[PreferenceManager sharedInstance] getIntPref:"browser.backspace_action" withSuccess:NULL];
|
||||
|
||||
if (deleteKeyAction == 0) { // map to back/forward
|
||||
if ([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask)
|
||||
[self forward:sender];
|
||||
else
|
||||
[self back:sender];
|
||||
}
|
||||
// all other values for browser.backspace_action should give no mapping at all,
|
||||
// including 1 (PgUp/PgDn mapping has no precedent on Mac OS, and we're not supporting it)
|
||||
}
|
||||
|
||||
-(void)loadURL:(NSString*)aURLSpec referrer:(NSString*)aReferrer activate:(BOOL)activate allowPopups:(BOOL)inAllowPopups
|
||||
|
Loading…
Reference in New Issue
Block a user