page title keeps changing between current and previous page flutter web - dart

I'm having a weird issue changing page titles when using getx routing and navigation.
Screenshot of the page title issue:
im using this code to change page title :
void setPageTitle(String title, BuildContext context) {
SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription(
label: title,
primaryColor: Theme.of(context).primaryColor.value, // This line is required
));
}
and it only happens when im using :
Get.toNamed(pageRoute);
this issue doesn't appear when im using :
Get.OffAllNamed(pageRoute);

Related

IOS Keyboard disappear randomly on web input

I experience a weird ios keyboard issue on our pwa web page.
As the photo below, the keyboard body disppear while the toolbar remains. And once this situation appear, it will keep like that until I restart the pwa app.
We use react and the input element is a Material-ui Textfield. While there have some conditional render on parent component
function handleChange(e) {
var value = e.target.value;
setValue(value);
return 0
};
<MaterialUi_TextField
inputProps={"title": "quantity", "onFocus": onFocus, "onBlur": onBlur}
type={"number"}
value={value}
onChange={handleChange}
/>;
other info to mention:
ios version = 13.4.1, 13.6
there is a meta user-scalable=0 on the page

The flutter app using 'webview_flutter' or 'flutter_inappbrowser' is stuck when I slide right back to the previous page

There are two pages that contains webview, and their routing order is A to B.
while sliding right slowly at the B page to return A, the app is stuck in the middle-state with A and B display half of each.
I found the following rules:
1. Both A and B must contain the webview;
2. The webview in A can be any height, even 0;
3. The problem occurs only when the sliding finger is within the scope of the webview of B.
The webview lib is flutter_inappbrowser: ^0.6.0, and the problem can occur in the simplest way to use.
#override
Widget build(BuildContext context) {
return Container(
height: 200,
child: InAppWebView(
initialUrl: 'https://www.google.com',
),
);
}
there is a new version of the plugin published which will help you.
use flutter_inappbrowser: ^1.1.1

Using Flutter, how can I trigger onSubmitted() of TextField on iOS?

Please take a look at the following Flutter code snippet: it creates a TextField that is intended as a single line input field tat will submit its value when Return is pressed:
child: new TextField(
decoration: _deco,
maxLines: 1,
autofocus: true,
onSubmitted: (newValue) {print(newValue);},
onChanged: (newValue) {
setState(() {
strTemperature = newValue.trim();
});
})),
On the iOS Simulator the corresponding app looks as follows:
As you can see the widget is configured with maxLines = 1, but when I click the Return key on the onscreen keyboard, line feeds are insert. Please spot the narrow blue cursor a couple of lines below the widget. Also, I see no console output, which should be the case because of my onSubmitted() lambda.
Am I configuring the text field correctly, or am I missing something?
This looks to me like it's actually just a bug in the iOS version of Flutter. Filed issue #9839.

angular bootstrap modal won't appear in the front when browser is full screen on an element

When I go full screen on an element and then try to display angular bootstrap's modal in front, it won't appear in front.
To test it:
1 - Click on this link http://plnkr.co/edit/oKZHZZebyNMwpG114Jyy?p=preview
2 - Click on the "launch the preview in separate window" icon (image shown below)
3 - Click on Go Full Screen Button (you will then be in full screen on the element with id fullable)
4 - Then click on any of the buttons to try to show a modal.
Here is how to "launch the preview in separate window" on plnkr:
Solution to this problem required modal window to be appended to the element of my choice (in this case, element that goes full screen).
To accomplish this, I updated the angular bootstrap modal's code so that options object we pass to the $modal.open() function now accepts an appendTo property which is a css selector that will be used by document.querySelector.
In modal code (version 0.12.1), I changed from these:
var body = $document.find('body').eq(0),
currBackdropIndex = backdropIndex();
...
$modalStack.open(modalInstance, {
scope: modalScope,
deferred: modalResultDeferred,
content: tplAndVars[0],
backdrop: modalOptions.backdrop,
keyboard: modalOptions.keyboard,
backdropClass: modalOptions.backdropClass,
windowClass: modalOptions.windowClass,
windowTemplateUrl: modalOptions.windowTemplateUrl,
size: modalOptions.size
});
to these:
var body = angular.element(document.querySelector(modal.appendTo)),
currBackdropIndex = backdropIndex();
...
$modalStack.open(modalInstance, {
scope: modalScope,
deferred: modalResultDeferred,
content: tplAndVars[0],
backdrop: modalOptions.backdrop,
keyboard: modalOptions.keyboard,
backdropClass: modalOptions.backdropClass,
windowClass: modalOptions.windowClass,
windowTemplateUrl: modalOptions.windowTemplateUrl,
size: modalOptions.size,
appendTo: modalOptions.appendTo || 'body'
});
I opened an issue for this on github but it was closed without resolution so I had to update my local copy. Github issue is here: https://github.com/angular-ui/bootstrap/issues/3686
Please note: Since I am using document.querySelector for this, fix will work on browsers that support document.querySelector (almost all plus IE >= 9) http://caniuse.com/#feat=queryselector

Kendo window open() issue in IE 9

On the click of a button, I am opening a kendoWindow which loads partial view.
This partial view also contains a kendo grid inside.
My issue with this is everything works fine in chrome, but there is an issue in IE.
Here is sample code -
if (!$popupContainer.data("kendoWindow")) {
popUpWindow = $(windowId).kendoWindow({
actions: ["Close"],
draggable: true,
modal: true,
resizable: true,
title: title,
width: "900px",
close: onClose,
open: onOpen,
deactivate: function () { this.destroy(); }
});
popUpWindow.data("kendoWindow").center();
popUpWindow.data("kendoWindow").open();
}
win.content('Loading....');
win.refresh
({
url: "some action url which loads a partial view";
});
My issue with IE is it's working fine first and second time but the third time the popup is not opening immediately, it's taking some time and I don't want that.
I want that window to open saying loading and then load the grid.
I tried debugging it and found the that this line: popUpWindow.data("kendoWindow").open();
is not opening the window, it's opening only after the partial view is loaded.
Where as in chrome open() function opens the window immediately thus showing the loading text before the partial view is loaded.
Can anyone help me with this?
I have been trying to resolve this for two days and it's very infuriating.
Okay for someone who is facing into similar issues, I have found the reason for why I am getting this issue. This occurred because I was trying to open the window and refresh content in recursive ajax calls and the UI changes are not being updated in IE until all the requests are completed.

Resources