diff --git a/.gitignore b/.gitignore index 735cda3af7c..be2dd518b54 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,8 @@ uv.lock .python-version MODULE.bazel.lock + +# Ignore Xcode projects created by xcodegen +*.xcodeproj +*.xcworkspace +Info.plist diff --git a/demos/energy-monitor/ios-project.yml b/demos/energy-monitor/ios-project.yml index f5b466200b0..f97738f9ca2 100644 --- a/demos/energy-monitor/ios-project.yml +++ b/demos/energy-monitor/ios-project.yml @@ -9,15 +9,14 @@ targets: Energy Monitor: type: application platform: iOS - deploymentTarget: "12.0" + deploymentTarget: "16.6" info: - path: Info.plist - properties: - UILaunchScreen: - - ImageRespectSafeAreaInsets: false + path: Info.plist + properties: + UILaunchScreen: + - ImageRespectSafeAreaInsets: false sources: [] postCompileScripts: - script: | ../../scripts/build_for_ios_with_cargo.bash energy-monitor - outputFileLists: - $TARGET_BUILD_DIR/$EXECUTABLE_PATH + outputFileLists: $TARGET_BUILD_DIR/$EXECUTABLE_PATH diff --git a/internal/core/items/text.rs b/internal/core/items/text.rs index 03912876331..25b7ee2c321 100644 --- a/internal/core/items/text.rs +++ b/internal/core/items/text.rs @@ -807,7 +807,7 @@ impl Item for TextInput { self.as_ref().anchor_position_byte_offset.set(clicked_offset); } - #[cfg(not(target_os = "android"))] + #[cfg(not(any(target_os = "android", target_os = "ios")))] self.ensure_focus_and_ime(window_adapter, self_rc); match click_count % 3 { @@ -826,13 +826,13 @@ impl Item for TextInput { return InputEventResult::GrabMouse; } MouseEvent::Pressed { button: PointerEventButton::Middle, .. } => { - #[cfg(not(target_os = "android"))] + #[cfg(not(any(target_os = "android", target_os = "ios")))] self.ensure_focus_and_ime(window_adapter, self_rc); } MouseEvent::Released { button: PointerEventButton::Left, .. } => { self.as_ref().pressed.set(0); self.copy_clipboard(window_adapter, Clipboard::SelectionClipboard); - #[cfg(target_os = "android")] + #[cfg(any(target_os = "android", target_os = "ios"))] self.ensure_focus_and_ime(window_adapter, self_rc); } MouseEvent::Released { position, button: PointerEventButton::Middle, .. } => { @@ -1269,10 +1269,10 @@ impl core::convert::TryFrom for TextCursorDirection { key_codes::DownArrow => Self::NextLine, key_codes::PageUp => Self::PageUp, key_codes::PageDown => Self::PageDown, - // On macos this scrolls to the top or the bottom of the page - #[cfg(not(target_os = "macos"))] + // On macOS and iOS this scrolls to the top or the bottom of the page + #[cfg(not(target_vendor = "apple"))] key_codes::Home => Self::StartOfLine, - #[cfg(not(target_os = "macos"))] + #[cfg(not(target_vendor = "apple"))] key_codes::End => Self::EndOfLine, _ => return Err(()), })