Browse Source
Merge branch 'master' into issues/3692
pull/3693/head
Dariusz Komosiński
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
2 deletions
-
src/Avalonia.Controls/TextBox.cs
-
src/Avalonia.Themes.Default/TextBox.xaml
|
|
@ -701,7 +701,8 @@ namespace Avalonia.Controls |
|
|
{ |
|
|
{ |
|
|
var text = Text; |
|
|
var text = Text; |
|
|
|
|
|
|
|
|
if (text != null && e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) |
|
|
var clickInfo = e.GetCurrentPoint(this); |
|
|
|
|
|
if (text != null && clickInfo.Properties.IsLeftButtonPressed && !(clickInfo.Pointer?.Captured is Border)) |
|
|
{ |
|
|
{ |
|
|
var point = e.GetPosition(_presenter); |
|
|
var point = e.GetPosition(_presenter); |
|
|
var index = CaretIndex = _presenter.GetCaretIndex(point); |
|
|
var index = CaretIndex = _presenter.GetCaretIndex(point); |
|
|
|
|
|
@ -69,7 +69,7 @@ |
|
|
<Style Selector="TextBox:error /template/ Border#border"> |
|
|
<Style Selector="TextBox:error /template/ Border#border"> |
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ErrorBrush}"/> |
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ErrorBrush}"/> |
|
|
</Style> |
|
|
</Style> |
|
|
<Style Selector="TextBox"> |
|
|
<Style Selector="TextBox /template/ DockPanel"> |
|
|
<Setter Property="Cursor" Value="IBeam" /> |
|
|
<Setter Property="Cursor" Value="IBeam" /> |
|
|
</Style> |
|
|
</Style> |
|
|
<Style Selector="TextBox:disabled /template/ Border#border"> |
|
|
<Style Selector="TextBox:disabled /template/ Border#border"> |
|
|
|