Skip to content

Commit 690ee0c

Browse files
committed
[bugfix] Fixed issue where click add signature button in the signature overlay will clear location in the signature tool
1 parent 1419980 commit 690ee0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/SignatureOverlay/SignatureOverlay.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class SignatureOverlay extends React.PureComponent {
2020
static propTypes = {
2121
isOpen: PropTypes.bool,
2222
isDisabled: PropTypes.bool,
23+
isSignatureModalOpen: PropTypes.bool,
2324
closeElements: PropTypes.func.isRequired,
2425
closeElement: PropTypes.func.isRequired,
2526
openElement: PropTypes.func.isRequired,
@@ -55,6 +56,7 @@ class SignatureOverlay extends React.PureComponent {
5556
const { freeHandAnnot } = this.signatureTool;
5657
if (
5758
prevProps.isOpen && !this.props.isOpen &&
59+
!this.props.isSignatureModalOpen &&
5860
freeHandAnnot && !freeHandAnnot.getPaths().length
5961
) {
6062
// location of signatureTool will be set when clicking on a signature widget
@@ -206,7 +208,8 @@ class SignatureOverlay extends React.PureComponent {
206208

207209
const mapStateToProps = state => ({
208210
isDisabled: selectors.isElementDisabled(state, 'signatureOverlay'),
209-
isOpen: selectors.isElementOpen(state, 'signatureOverlay')
211+
isOpen: selectors.isElementOpen(state, 'signatureOverlay'),
212+
isSignatureModalOpen: selectors.isElementOpen(state, 'signatureModal')
210213
});
211214

212215
const mapDispatchToProps = {

0 commit comments

Comments
 (0)