Link Toolbar Improves (#269)

* WIP

* Internal link handling

* Keyboard navigation of link select

* More constants

* Save relative urls.
Relative urls are atlas urls
This commit is contained in:
Tom Moor
2017-09-27 23:29:48 -04:00
committed by GitHub
parent ca5d8baa4d
commit 606dc69204
7 changed files with 236 additions and 32 deletions

View File

@@ -44,8 +44,7 @@ type Props = {
ev.preventDefault();
if (this.firstDocument) {
const element = ReactDOM.findDOMNode(this.firstDocument);
// $FlowFixMe
if (element && element.focus) element.focus();
if (element instanceof HTMLElement) element.focus();
}
}
};
@@ -54,9 +53,8 @@ type Props = {
this.props.history.push(this.props.document.url);
};
handleFilter = (e: SyntheticInputEvent) => {
const value = e.target.value;
this.searchTerm = value;
handleFilter = (ev: SyntheticInputEvent) => {
this.searchTerm = ev.target.value;
this.updateSearchResults();
};