fix: widgets text select issue in mobile view

This commit is contained in:
RaktimaNXG
2024-01-31 19:55:06 +05:30
parent fe03da1d97
commit 048629dd32
3 changed files with 17 additions and 9 deletions
@@ -45,11 +45,11 @@ function AllWidgets(props) {
return (
<div key={ind} style={{ marginBottom: "10px" }}>
<div
className="widgets"
onClick={(e) => {
props.addPositionOfSignature &&
props.addPositionOfSignature("onclick", item);
}}
className="draggable"
ref={(element) => {
// if (!props.isMobile) {
item.ref(element);
@@ -26,8 +26,17 @@
.dropdownContainer::-webkit-scrollbar {
display: none;
}
.react-datepicker__input-container{
position: initial !important;
.react-datepicker__input-container {
position: initial !important;
}
.widgets {
-webkit-user-select: none;
/* Disable text selection in WebKit browsers */
-moz-user-select: none;
user-select: none;
}
.inputPlaceholder {
@@ -97,6 +106,7 @@ position: initial !important;
width: 460px;
height: 184px;
}
.intialSignatureCanvas {
border: 2px solid #888;
background-color: rgb(255, 255, 255);
@@ -126,6 +136,7 @@ position: initial !important;
height: 14px;
}
.dropdown-date-menu {
min-width: 7rem;
}
@@ -138,7 +149,7 @@ position: initial !important;
border: none !important;
color: white !important;
}
.mailBtn:hover {
box-shadow: 0 2px 4px rgba(154, 36, 36, 0.1), 0 2px 4px rgba(0, 0, 0, 0.18);
}
@@ -249,16 +249,13 @@ export const getWidgetType = (
onTouchStart={() => handleTouchStart && handleTouchStart(item.type)}
onTouchEnd={handleTouchEnd && handleTouchEnd}
onTouchMove={handleTouchMove && handleTouchMove}
className="signatureBtn"
className="signatureBtn widgets"
style={{
boxShadow:
"0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.18)",
marginLeft: marginLeft && `${marginLeft}px`,
background:
selectWidgetType === item.type &&
backgroundColor &&
backgroundColor,
userSelect: "none"
selectWidgetType === item.type && backgroundColor && backgroundColor
}}
>
<div