bug fixes

- click handler event binding
- click handler on img elem
- trailing space in content
- sidebar will-change optimization
- sidebar auto to top
- sidebar not closed after post
- reply form bottom position
This commit is contained in:
xmcp
2019-06-12 16:35:20 +08:00
parent f72ab83ca4
commit ed4794ed5a
8 changed files with 33 additions and 19 deletions

View File

@@ -281,7 +281,7 @@ class FlowSidebar extends PureComponent {
}
show_reply_bar(name,event) {
if(this.reply_ref.current && event.target.tagName.toLowerCase()!=='a') {
if(this.reply_ref.current && !event.target.closest('a')) {
let text=this.reply_ref.current.get();
if(/^\s*(Re (洞主|\b[A-Z][a-z]+){0,2}:)?\s*$/.test(text)) {// text is nearly empty so we can replace it
let should_text='Re '+name+': ';