diff options
author | bob <bcz@cs.brown.edu> | 2019-04-12 11:25:02 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-04-12 11:25:02 -0400 |
commit | 3249a76b9fc1984b013ab4cf267602e1cfd4b5ae (patch) | |
tree | f11abb91ae4687bc3dcc356bcecd970539092b4f | |
parent | 0c9d3637bde9825efe93c55afce8270b2a2e979c (diff) |
added title bar dragging for decorations.
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 03b16fb0b..15ac0a8fc 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -108,7 +108,9 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> document.addEventListener("pointerup", this.onBackgroundUp); this._lastDrag = [e.clientX, e.clientY]; e.stopPropagation(); - e.preventDefault(); + if (e.currentTarget.localName !== "input") { + e.preventDefault(); + } } @action @@ -404,7 +406,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> opacity: this._opacity }}> <div className="documentDecorations-minimizeButton" onPointerDown={this.onMinimizeDown}>...</div> - <input ref={this.keyinput} className="title" type="text" name="dynbox" value={this.getValue()} onChange={this.handleChange} onPointerDown={this.onPointerDown} onKeyPress={this.enterPressed} /> + <input ref={this.keyinput} className="title" type="text" name="dynbox" value={this.getValue()} onChange={this.handleChange} onPointerDown={this.onBackgroundDown} onKeyPress={this.enterPressed} /> <div className="documentDecorations-closeButton" onPointerDown={this.onCloseDown}>X</div> <div id="documentDecorations-topLeftResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> <div id="documentDecorations-topResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> |