CSS + behavior tweaks

This commit is contained in:
Rainer Simon 2020-09-05 13:39:54 +02:00
parent 1c4faffceb
commit ed78059ec5
6 changed files with 13 additions and 7 deletions

View File

@ -155,13 +155,13 @@ const Editor = props => {
}
{ props.readOnly ? (
<div className="footer">
<div className="r6o-footer">
<button
className="r6o-btn"
onClick={onCancel}>{i18n.t('Close')}</button>
</div>
) : (
<div className="footer">
<div className="r6o-footer">
<button
className="r6o-btn outline"
onClick={onCancel}>{i18n.t('Cancel')}</button>

View File

@ -7,8 +7,8 @@ const Autocomplete = props => {
const [ inputItems, setInputItems ] = useState(props.vocabulary);
useEffect(() =>
element.current?.querySelector('input')?.focus(), []);
// useEffect(() =>
// element.current?.querySelector('input')?.focus(), []);
const onInputValueChange = ({ inputValue }) => {
if (inputValue.length > 0) {

View File

@ -19,8 +19,9 @@ export default class TextEntryField extends Component {
// Focus on render
onRender = ref => {
if (ref && this.props.editable)
if (ref && this.props.editable) {
ref.focus();
}
}
render() {

View File

@ -54,7 +54,7 @@
}
}
.footer {
.r6o-footer {
text-align:right;
padding:8px 0;

View File

@ -3,7 +3,10 @@
min-height:3em;
background-color:#fff;
position:relative;
padding:8px 10px;
.r6o-editable-text {
padding:8px 10px;
}
.lastmodified {
border:1px solid $lightgrey-border;

View File

@ -89,6 +89,7 @@
.r6o-autocomplete {
flex:1;
position:relative;
li {
font-size:14px;
@ -96,6 +97,7 @@
}
input {
width:100%;
padding:0 3px;
min-width:80px;
outline:none;