Skip to content

Commit cbf26bc

Browse files
authored
Merge branch 'main' into capacitor
2 parents 82548c5 + 4395754 commit cbf26bc

File tree

9 files changed

+308
-234
lines changed

9 files changed

+308
-234
lines changed

config.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,18 @@
3333
<preference name="prerendered-icon" value="false" />
3434
<preference name="androidxEnabled" value="true" />
3535

36+
3637
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
3738
<application android:networkSecurityConfig="@xml/network_security_config" />
3839
<application android:hardwareAccelerated="true" />
3940
<application android:requestLegacyExternalStorage="true" />
4041
<application android:largeHeap="true" />
4142
</edit-config>
4243

44+
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
45+
<activity android:resizeableActivity="true" />
46+
</edit-config>
47+
4348
<config-file parent="./application/activity" target="AndroidManifest.xml">
4449
<intent-filter>
4550
<action android:name="android.intent.action.VIEW" />

src/dialogs/prompt.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@ import appSettings from "lib/settings";
1919
* @param {PromptOptions} options
2020
* @returns {Promise<string|number|null>} Returns null if cancelled
2121
*/
22+
2223
export default function prompt(
2324
message,
2425
defaultValue,
2526
type = "text",
2627
options = {},
2728
) {
29+
const commands = editorManager.editor.commands;
30+
const originalExec = commands.exec;
31+
32+
commands.exec = () => {}; // Disable all shortcuts
33+
2834
return new Promise((resolve) => {
2935
const inputType = type === "textarea" ? "textarea" : "input";
3036
type = type === "filename" ? "text" : type;
@@ -50,6 +56,7 @@ export default function prompt(
5056
hide();
5157
let { value } = input;
5258
if (type === "number") value = +value;
59+
5360
resolve(value);
5461
},
5562
});
@@ -151,6 +158,7 @@ export default function prompt(
151158
}
152159

153160
function hide() {
161+
commands.exec = originalExec;
154162
actionStack.remove("prompt");
155163
system.setInputType(appSettings.value.keyboardMode);
156164
hidePrompt();

0 commit comments

Comments
 (0)