Search functionality works

This commit is contained in:
Kovid Goyal 2018-07-27 17:29:00 +05:30
parent 84a884e49e
commit fe25b8d8f6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -10,7 +10,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
# check if you can remove the restriction that prevents inspector dock from being undocked # check if you can remove the restriction that prevents inspector dock from being undocked
# check the context menu # check the context menu
# check syncing of position back and forth # check syncing of position back and forth
# check all butotns and search functionality in preview panel # check all buttons in preview panel
# rewrite JS from coffeescript to rapydscript # rewrite JS from coffeescript to rapydscript
# pass user stylesheet with css for split # pass user stylesheet with css for split
@ -484,7 +484,7 @@ class Preview(QWidget):
def find(self, direction): def find(self, direction):
text = unicode_type(self.search.text()) text = unicode_type(self.search.text())
self.view.findText(text, QWebEnginePage.FindWrapsAroundDocument | ( self.view._page.findText(text, (
QWebEnginePage.FindBackward if direction == 'prev' else QWebEnginePage.FindFlags(0))) QWebEnginePage.FindBackward if direction == 'prev' else QWebEnginePage.FindFlags(0)))
def find_next(self): def find_next(self):