signatur 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/js/bundle.js +11 -5
- package/static/js/plugins/keyboard.js +11 -5
package/package.json
CHANGED
package/static/js/bundle.js
CHANGED
|
@@ -1764,6 +1764,11 @@ const countLines = function(text) {
|
|
|
1764
1764
|
* Shows the accent popup above the pressed key with
|
|
1765
1765
|
* the available accented character variants.
|
|
1766
1766
|
*
|
|
1767
|
+
* The popup is appended to the document body (instead of the
|
|
1768
|
+
* keyboard container) and positioned with fixed coordinates so
|
|
1769
|
+
* it is never clipped by the container's overflow handling, which
|
|
1770
|
+
* would otherwise hide it for keys on the top keyboard row.
|
|
1771
|
+
*
|
|
1767
1772
|
* @param {Element} context The keyboard container context.
|
|
1768
1773
|
* @param {Element} element The key element that was long pressed.
|
|
1769
1774
|
* @param {String} accents Comma-separated list of accented characters.
|
|
@@ -1793,13 +1798,14 @@ const countLines = function(text) {
|
|
|
1793
1798
|
|
|
1794
1799
|
popup.append(arrow);
|
|
1795
1800
|
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
const
|
|
1799
|
-
const
|
|
1801
|
+
// positions the popup using viewport coordinates and anchors it
|
|
1802
|
+
// to the body so it escapes the keyboard container's clipping
|
|
1803
|
+
const rect = element[0].getBoundingClientRect();
|
|
1804
|
+
const left = rect.left + rect.width / 2;
|
|
1805
|
+
const top = rect.top;
|
|
1800
1806
|
popup.css({ left: left + "px", top: top + "px" });
|
|
1801
1807
|
|
|
1802
|
-
|
|
1808
|
+
body.append(popup);
|
|
1803
1809
|
|
|
1804
1810
|
// dismisses the popup when clicking outside of it
|
|
1805
1811
|
// by registering a one-time click handler on the document
|
|
@@ -74,6 +74,11 @@
|
|
|
74
74
|
* Shows the accent popup above the pressed key with
|
|
75
75
|
* the available accented character variants.
|
|
76
76
|
*
|
|
77
|
+
* The popup is appended to the document body (instead of the
|
|
78
|
+
* keyboard container) and positioned with fixed coordinates so
|
|
79
|
+
* it is never clipped by the container's overflow handling, which
|
|
80
|
+
* would otherwise hide it for keys on the top keyboard row.
|
|
81
|
+
*
|
|
77
82
|
* @param {Element} context The keyboard container context.
|
|
78
83
|
* @param {Element} element The key element that was long pressed.
|
|
79
84
|
* @param {String} accents Comma-separated list of accented characters.
|
|
@@ -103,13 +108,14 @@
|
|
|
103
108
|
|
|
104
109
|
popup.append(arrow);
|
|
105
110
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
const
|
|
111
|
+
// positions the popup using viewport coordinates and anchors it
|
|
112
|
+
// to the body so it escapes the keyboard container's clipping
|
|
113
|
+
const rect = element[0].getBoundingClientRect();
|
|
114
|
+
const left = rect.left + rect.width / 2;
|
|
115
|
+
const top = rect.top;
|
|
110
116
|
popup.css({ left: left + "px", top: top + "px" });
|
|
111
117
|
|
|
112
|
-
|
|
118
|
+
body.append(popup);
|
|
113
119
|
|
|
114
120
|
// dismisses the popup when clicking outside of it
|
|
115
121
|
// by registering a one-time click handler on the document
|