disable word selection if is_secure == true
This commit is contained in:
parent
1ad83889be
commit
767096b9bb
1 changed files with 10 additions and 6 deletions
|
|
@ -214,14 +214,18 @@ where
|
||||||
|
|
||||||
match self.state.mouse.update(cursor_position) {
|
match self.state.mouse.update(cursor_position) {
|
||||||
Interaction::DoubleClick(_) => {
|
Interaction::DoubleClick(_) => {
|
||||||
let end = self.state.cursor.end();
|
if self.is_secure {
|
||||||
self.state.cursor.select_range(
|
self.state.cursor.select_all(&self.value);
|
||||||
self.value.previous_start_of_word(end),
|
} else {
|
||||||
self.value.next_end_of_word(end),
|
let end = self.state.cursor.end();
|
||||||
)
|
self.state.cursor.select_range(
|
||||||
|
self.value.previous_start_of_word(end),
|
||||||
|
self.value.next_end_of_word(end),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Interaction::TripleClick(_) => {
|
Interaction::TripleClick(_) => {
|
||||||
self.state.cursor.select_all(&self.value)
|
self.state.cursor.select_all(&self.value);
|
||||||
}
|
}
|
||||||
Interaction::Click(_) => {
|
Interaction::Click(_) => {
|
||||||
if target > 0.0 {
|
if target > 0.0 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue