Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
pleroma-fe
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
261
Issues
261
List
Boards
Labels
Service Desk
Milestones
Merge Requests
20
Merge Requests
20
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pleroma
pleroma-fe
Commits
34d18ac0
Commit
34d18ac0
authored
Feb 25, 2021
by
Shpuld Shpludson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
focus input in emoji picker and react picker
parent
5faca012
Pipeline
#35166
passed with stages
in 8 minutes and 43 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
2 deletions
+21
-2
CHANGELOG.md
CHANGELOG.md
+1
-0
src/components/emoji_input/emoji_input.js
src/components/emoji_input/emoji_input.js
+8
-0
src/components/popover/popover.js
src/components/popover/popover.js
+5
-2
src/components/react_button/react_button.js
src/components/react_button/react_button.js
+6
-0
src/components/react_button/react_button.vue
src/components/react_button/react_button.vue
+1
-0
No files found.
CHANGELOG.md
View file @
34d18ac0
...
...
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
-
Display 'people voted' instead of 'votes' for multi-choice polls
-
Optimized chat to not get horrible performance after keeping the same chat open for a long time
-
When opening emoji picker or react picker, it automatically focuses the search field
### Added
-
Added reason field for registration when approval is required
...
...
src/components/emoji_input/emoji_input.js
View file @
34d18ac0
...
...
@@ -194,11 +194,18 @@ const EmojiInput = {
}
},
methods
:
{
focusPickerInput
()
{
const
pickerEl
=
this
.
$refs
.
picker
.
$el
if
(
!
pickerEl
)
return
const
pickerInput
=
pickerEl
.
querySelector
(
'
input
'
)
if
(
pickerInput
)
pickerInput
.
focus
()
},
triggerShowPicker
()
{
this
.
showPicker
=
true
this
.
$refs
.
picker
.
startEmojiLoad
()
this
.
$nextTick
(()
=>
{
this
.
scrollIntoView
()
this
.
focusPickerInput
()
})
// This temporarily disables "click outside" handler
// since external trigger also means click originates
...
...
@@ -214,6 +221,7 @@ const EmojiInput = {
if
(
this
.
showPicker
)
{
this
.
scrollIntoView
()
this
.
$refs
.
picker
.
startEmojiLoad
()
this
.
$nextTick
(()
=>
this
.
focusPickerInput
())
}
},
replace
(
replacement
)
{
...
...
src/components/popover/popover.js
View file @
34d18ac0
...
...
@@ -121,9 +121,12 @@ const Popover = {
}
},
showPopover
()
{
if
(
this
.
hidden
)
this
.
$emit
(
'
show
'
)
const
wasHidden
=
this
.
hidden
this
.
hidden
=
false
this
.
$nextTick
(
this
.
updateStyles
)
this
.
$nextTick
(()
=>
{
if
(
wasHidden
)
this
.
$emit
(
'
show
'
)
this
.
updateStyles
()
})
},
hidePopover
()
{
if
(
!
this
.
hidden
)
this
.
$emit
(
'
close
'
)
...
...
src/components/react_button/react_button.js
View file @
34d18ac0
...
...
@@ -23,6 +23,12 @@ const ReactButton = {
this
.
$store
.
dispatch
(
'
reactWithEmoji
'
,
{
id
:
this
.
status
.
id
,
emoji
})
}
close
()
},
focusInput
()
{
this
.
$nextTick
(()
=>
{
const
input
=
this
.
$el
.
querySelector
(
'
input
'
)
if
(
input
)
input
.
focus
()
})
}
},
computed
:
{
...
...
src/components/react_button/react_button.vue
View file @
34d18ac0
...
...
@@ -6,6 +6,7 @@
:offset=
"
{ y: 5 }"
:bound-to="{ x: 'container' }"
remove-padding
@show="focusInput"
>
<div
slot=
"content"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment