mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-27 08:31:20 +02:00
Fixed firefox incompatiblity
This commit is contained in:
parent
f9a7a00ecc
commit
184b2f1b25
@ -24,11 +24,11 @@ export default class Editable extends React.Component<Props> {
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
this.elementRef.current!.focus()
|
||||
|
||||
// Put cursor at end
|
||||
document.execCommand('selectAll', false, undefined)
|
||||
document.getSelection()?.collapseToEnd()
|
||||
if (this.elementRef.current) {
|
||||
const valueLength = this.elementRef.current.value.length
|
||||
this.elementRef.current.focus()
|
||||
this.elementRef.current.setSelectionRange(valueLength, valueLength)
|
||||
}
|
||||
}
|
||||
|
||||
public blur = (): void => {
|
||||
|
Loading…
Reference in New Issue
Block a user