Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ uv.lock
.python-version

MODULE.bazel.lock

# Ignore Xcode projects created by xcodegen
*.xcodeproj
*.xcworkspace
Info.plist
13 changes: 6 additions & 7 deletions demos/energy-monitor/ios-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 6 additions & 6 deletions internal/core/items/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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, .. } => {
Expand Down Expand Up @@ -1269,10 +1269,10 @@ impl core::convert::TryFrom<char> 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(()),
})
Expand Down
Loading