mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 02:20:53 +00:00
Fix undo menu appearing when opening the keyboard on iOS 16
This commit is contained in:
18
Limelight/Input/KeyboardInputField.h
Normal file
18
Limelight/Input/KeyboardInputField.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// KeyboardInputField.h
|
||||
// Moonlight
|
||||
//
|
||||
// Created by Cameron Gutman on 12/2/22.
|
||||
// Copyright © 2022 Moonlight Game Streaming Project. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface KeyboardInputField : UITextField
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
18
Limelight/Input/KeyboardInputField.m
Normal file
18
Limelight/Input/KeyboardInputField.m
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// KeyboardInputField.m
|
||||
// Moonlight
|
||||
//
|
||||
// Created by Cameron Gutman on 12/2/22.
|
||||
// Copyright © 2022 Moonlight Game Streaming Project. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KeyboardInputField.h"
|
||||
|
||||
@implementation KeyboardInputField
|
||||
|
||||
- (UIEditingInteractionConfiguration) editingInteractionConfiguration {
|
||||
// Suppress the Undo menu that appears with a 3 finger tap
|
||||
return UIEditingInteractionConfigurationNone;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -13,13 +13,14 @@
|
||||
#import "KeyboardSupport.h"
|
||||
#import "RelativeTouchHandler.h"
|
||||
#import "AbsoluteTouchHandler.h"
|
||||
#import "KeyboardInputField.h"
|
||||
|
||||
static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
|
||||
@implementation StreamView {
|
||||
OnScreenControls* onScreenControls;
|
||||
|
||||
UITextField* keyInputField;
|
||||
KeyboardInputField* keyInputField;
|
||||
BOOL isInputingText;
|
||||
|
||||
float streamAspectRatio;
|
||||
@@ -52,7 +53,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
|
||||
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
|
||||
|
||||
keyInputField = [[UITextField alloc] initWithFrame:CGRectZero];
|
||||
keyInputField = [[KeyboardInputField alloc] initWithFrame:CGRectZero];
|
||||
[keyInputField setKeyboardType:UIKeyboardTypeDefault];
|
||||
[keyInputField setAutocorrectionType:UITextAutocorrectionTypeNo];
|
||||
[keyInputField setAutocapitalizationType:UITextAutocapitalizationTypeNone];
|
||||
|
||||
Reference in New Issue
Block a user