Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Make list width to be 100% instead of dynamic (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu authored and mrstegeman committed Oct 23, 2018
1 parent 3351162 commit b7cd82f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 0 additions & 7 deletions extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,6 @@ const languagePromise = fetch(
input.size = Math.max(input.value.length, 10);
input.idx_suggestion = 0;

if (list) {
list.style.width = `${input.offsetWidth}px`;
}

input.focus();

input.addEventListener("keypress", e => {
Expand All @@ -489,7 +485,6 @@ const languagePromise = fetch(

input.addEventListener("input", () => {
input.size = Math.max(10, input.value.length);
list.style.width = `${input.offsetWidth}px`;
});

form.addEventListener("submit", function _submit_form(e) {
Expand All @@ -511,7 +506,6 @@ const languagePromise = fetch(
list.classList.add('close');
input.value = e.target.textContent;
input.size = input.value.length;
list.style.width = `${input.offsetWidth}px`;

resolve(result);
}
Expand All @@ -529,7 +523,6 @@ const languagePromise = fetch(
list.classList.add('close');
input.value = e.target.textContent;
input.size = input.value.length;
list.style.width = `${input.offsetWidth}px`;

resolve(result);
}
Expand Down
1 change: 1 addition & 0 deletions extension/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
position: absolute;
transform-origin: top;
transform: scaleY(0);
width: 100%;
}

#stm-list.close {
Expand Down

0 comments on commit b7cd82f

Please sign in to comment.