Skip to content

Commit

Permalink
키패드 테스트3
Browse files Browse the repository at this point in the history
  • Loading branch information
hnjung committed Aug 6, 2024
1 parent f843d34 commit 594aa45
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions MAWPUB/view/html/com/com/com/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
height: 0;
transition: height 0.5s linear;
}
#wrap {overflow: auto;}
</style>
</head>
<body>
Expand Down Expand Up @@ -158,7 +159,7 @@ <h2 class="main-copy">

<!-- .btn -->
<div class="btn-group option-main">
<button type="button" class="btn primary"><span>와ㅋ8다음</span></button>
<button type="button" class="btn primary"><span>와10다음</span></button>
</div>
<!--// .btn -->

Expand Down Expand Up @@ -257,20 +258,20 @@ <h2 class="main-copy">
triggerKeyboardOpen(event.currentTarget.height);
}

// make-scrollale 객체 추가
// make-scrollable 객체 추가
function appendScrollElement() {
const scrollElement = document.createElement('div');
scrollElement.setAttribute("id", "make-scrollale");
scrollElement.setAttribute("id", "make-scrollable");
document.querySelector('#wrap').appendChild(scrollElement);
}

function onFocus() {
document.querySelector("#make-scrollale").style.height = "calc(100% + 1px)";
document.querySelector("#make-scrollable").style.height = "calc(100% + 1px)";
document.querySelector('#wrap').style.overflow = "hidden";
}

function onFocusOut() {
document.querySelector("#make-scrollale").style.height = "0";
document.querySelector("#make-scrollable").style.height = "0";
document.querySelector('#wrap').style.overflow = "";
}

Expand All @@ -286,13 +287,10 @@ <h2 class="main-copy">
}

function scrollToActiveElement() {
// document.activeElement parent id contain wrap
if (document.activeElement.parentElement.id.includes('wrap')) {
document.activeElement.parentElement.scrollIntoView(true);
}
else {
document.activeElement.scrollIntoView(true);
}
var viewScrollHeight = document.querySelector('#wrap').scrollHeight;
var offset = viewScrollHeight - window.visualViewport.height ;

document.querySelector('#wrap').scrollTo(0, offset);
}

</script>
Expand Down

0 comments on commit 594aa45

Please sign in to comment.