Skip to content

Commit

Permalink
Merge pull request #1409 from osmlab/prerelease
Browse files Browse the repository at this point in the history
v3.6.13
  • Loading branch information
nrotstan authored Oct 12, 2020
2 parents 375d6c6 + dd811d9 commit 537acef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ The format is based on
This project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).


## [v3.6.13] - 2020-10-12
### Fixed
- Comment mention dropdown interfering with adding newlines to comment


## [v3.6.12] - 2020-10-07
### Added
- Updated translations and new Vietnamese locale (thank you translators!)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maproulette3",
"version": "3.6.12",
"version": "3.6.13",
"private": true,
"dependencies": {
"@apollo/client": "^3.1.1",
Expand Down
14 changes: 9 additions & 5 deletions src/components/AutosuggestTextBox/AutosuggestMentionTextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@ export default class AutosuggestMentionTextArea extends Component {
}
}

handleKeyDown = e => {
if (e.key === "Enter") {
// Don't let enter key potentially submit a form
e.preventDefault()
handleKeyDown = (e, dropdown) => {
if (dropdown.isDropdownVisible) {
if (e.key === "ArrowUp" ||
e.key === "ArrowDown" ||
e.key === "ArrowRight" ||
e.key === "ArrowLeft") {
e.preventDefault()
}
}
}

Expand Down Expand Up @@ -184,7 +188,7 @@ export default class AutosuggestMentionTextArea extends Component {
this.props.inputClassName,
"mr-flex-grow mr-w-full mr-h-full mr-outline-none"
)}
onKeyDown={this.handleKeyDown}
onKeyDown={(e) => this.handleKeyDown(e, dropdown)}
onFocus={(e) => this.setState({textBoxActive: true})}
onBlur={(e) => this.setState({textBoxActive: false})}
placeholder={this.props.placeholder}
Expand Down

0 comments on commit 537acef

Please sign in to comment.