Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
efc90a9e
Commit
efc90a9e
authored
1 month ago
by
Aleksandras Kostarevas
Browse files
Options
Downloads
Patches
Plain Diff
Enable autocorrect in WEB_EDIT_TEXT, add mIsWebField to input attributes
parent
8b39f743
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/org/futo/inputmethod/latin/InputAttributes.java
+10
-2
10 additions, 2 deletions
java/src/org/futo/inputmethod/latin/InputAttributes.java
with
10 additions
and
2 deletions
java/src/org/futo/inputmethod/latin/InputAttributes.java
+
10
−
2
View file @
efc90a9e
...
...
@@ -29,6 +29,7 @@ import org.futo.inputmethod.latin.utils.InputTypeUtils;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Objects
;
/**
* Class to hold attributes of the input field.
...
...
@@ -54,6 +55,7 @@ public final class InputAttributes {
*/
final
public
boolean
mDisableGestureFloatingPreviewText
;
final
public
boolean
mIsGeneralTextInput
;
final
public
boolean
mIsWebField
;
final
public
boolean
mNoLearning
;
final
private
int
mInputType
;
final
private
EditorInfo
mEditorInfo
;
...
...
@@ -95,6 +97,7 @@ public final class InputAttributes {
mIsGeneralTextInput
=
false
;
mNoLearning
=
false
;
mIsEmailField
=
false
;
mIsWebField
=
false
;
return
;
}
// inputClass == InputType.TYPE_CLASS_TEXT
...
...
@@ -127,13 +130,18 @@ public final class InputAttributes {
// TODO: This may need adjustment
mInputTypeNoAutoCorrect
=
shouldSuppressSuggestions
||
(
variation
==
InputType
.
TYPE_TEXT_VARIATION_WEB_EDIT_TEXT
&&
!
flagAutoCorrect
)
//
|| (variation == InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT && !flagAutoCorrect)
||
InputTypeUtils
.
isEmailVariation
(
variation
)
||
InputType
.
TYPE_TEXT_VARIATION_URI
==
variation
||
InputType
.
TYPE_TEXT_VARIATION_FILTER
==
variation
||
flagNoSuggestions
||
(
flagNoSuggestions
&&
variation
!=
InputType
.
TYPE_TEXT_VARIATION_WEB_EDIT_TEXT
)
||
mIsCodeField
;
// TODO: Firefox-based browsers don't set it to WEB_EDIT_TEXT
// Currently only checking against Firefox package name
mIsWebField
=
(
variation
==
InputType
.
TYPE_TEXT_VARIATION_WEB_EDIT_TEXT
)
||
Objects
.
equals
(
editorInfo
.
packageName
,
"org.mozilla.firefox"
);
// If it's a browser edit field and auto correct is not ON explicitly, then
// disable auto correction, but keep suggestions on.
// If NO_SUGGESTIONS is set, don't do prediction.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment