Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Jul 28, 2021
2 parents 54dfad3 + 2103e29 commit ec83d23
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 8 additions & 4 deletions lib/ui/app/app_webview.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:convert';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:invoiceninja_flutter/utils/web_stub.dart'
Expand Down Expand Up @@ -52,8 +54,9 @@ class _MobileWebViewState extends State<_MobileWebView>
super.didUpdateWidget(oldWidget);

if (widget.html != oldWidget.html) {
_webViewController.loadUrl(
Uri.dataFromString(widget.html, mimeType: 'text/html').toString());
_webViewController.loadUrl(Uri.dataFromString(widget.html,
mimeType: 'text/html', encoding: Encoding.getByName('utf-8'))
.toString());
}
}

Expand All @@ -62,8 +65,9 @@ class _MobileWebViewState extends State<_MobileWebView>
super.build(context);

return WebView(
initialUrl:
Uri.dataFromString(widget.html, mimeType: 'text/html').toString(),
initialUrl: Uri.dataFromString(widget.html,
mimeType: 'text/html', encoding: Encoding.getByName('utf-8'))
.toString(),
onWebViewCreated: (WebViewController webViewController) {
_webViewController = webViewController;
},
Expand Down
5 changes: 4 additions & 1 deletion lib/ui/invoice/edit/invoice_edit_desktop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import 'package:invoiceninja_flutter/utils/completers.dart';
import 'package:invoiceninja_flutter/utils/formatting.dart';
import 'package:invoiceninja_flutter/utils/icons.dart';
import 'package:invoiceninja_flutter/utils/localization.dart';
import 'package:pointer_interceptor/pointer_interceptor.dart';

class InvoiceEditDesktop extends StatefulWidget {
const InvoiceEditDesktop({
Expand Down Expand Up @@ -965,7 +966,9 @@ class __PdfPreviewState extends State<_PdfPreview> {
kIsWeb
? Padding(
padding: const EdgeInsets.only(right: 11),
child: HtmlElementView(viewType: _pdfString),
child: PointerInterceptor(
child: HtmlElementView(viewType: _pdfString),
),
)
: Padding(
padding: const EdgeInsets.all(8),
Expand Down

0 comments on commit ec83d23

Please sign in to comment.