aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/css/cascade.nim5
-rw-r--r--src/local/container.nim4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/css/cascade.nim b/src/css/cascade.nim
index 2bcff009..273a344c 100644
--- a/src/css/cascade.nim
+++ b/src/css/cascade.nim
@@ -176,6 +176,11 @@ proc applyPresHints(computed: CSSValues; element: Element;
let input = HTMLInputElement(element)
if input.inputType in InputTypeWithSize:
map_size
+ of TAG_SELECT:
+ let select = HTMLSelectElement(element)
+ if select.attrb(satMultiple):
+ let size = element.attrulgz(satSize).get(4)
+ set_cv cptHeight, length, resolveLength(cuEm, float64(size), attrs)
else: discard
type
diff --git a/src/local/container.nim b/src/local/container.nim
index abd9bbf0..7ba1a4bf 100644
--- a/src/local/container.nim
+++ b/src/local/container.nim
@@ -1600,8 +1600,8 @@ proc displaySelect(container: Container; selectResult: SelectResult) =
selectResult.multiple,
selectResult.options,
selectResult.selected,
- container.acursorx,
- container.acursory,
+ max(container.acursorx - 1, 0),
+ max(container.acursory - 1, 0),
container.width,
container.height,
selectFinish,