CN106445376B - Webpage operation method and device - Google Patents

Webpage operation method and device Download PDF

Info

Publication number
CN106445376B
CN106445376B CN201610787263.0A CN201610787263A CN106445376B CN 106445376 B CN106445376 B CN 106445376B CN 201610787263 A CN201610787263 A CN 201610787263A CN 106445376 B CN106445376 B CN 106445376B
Authority
CN
China
Prior art keywords
webpage
touch
event
gesture operation
page content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610787263.0A
Other languages
Chinese (zh)
Other versions
CN106445376A (en
Inventor
刘守群
左景龙
於一飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610787263.0A priority Critical patent/CN106445376B/en
Publication of CN106445376A publication Critical patent/CN106445376A/en
Application granted granted Critical
Publication of CN106445376B publication Critical patent/CN106445376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a webpage operation method and a webpage operation device, which relate to the technical field of information processing, and the method comprises the following steps: when a touch event aiming at a webpage is detected, judging whether a touch conflict occurs in the webpage; when touch conflict occurs in the webpage, displaying a conflict prompt message; after the gesture operation of the touch event is reset based on the conflict prompt message, judging whether the gesture operation is detected; and when the gesture operation is detected, responding to the touch event to realize the operation on the webpage. According to the webpage touch conflict judging method and device, the gesture operation of resetting the touch event is indicated to the user by judging the webpage touch conflict and displaying the conflict prompt message after the webpage touch conflict is determined, and then the webpage operation is achieved according to the gesture operation, so that when the user touches the webpage in the case of the touch conflict, the webpage operation can be achieved smoothly through the touch screen, and convenience of user operation is improved.

Description

Webpage operation method and device
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to a method and an apparatus for operating a web page.
Background
With the popularization of mobile terminals, more and more people choose to browse web page contents by using a browser in the mobile terminal, and on the mobile terminal, the operation of a web page in the browser is usually realized through a touch event on a touch screen of the device. Due to the design of web pages, there are often some web page areas in a web page that receive all touch events and do not respond to the touch events after receiving, and a conflict occurs when a user tries to trigger a touch event by touching a touch screen in the some web page areas to implement an operation on the web page.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method and an apparatus for operating a web page.
According to a first aspect of the embodiments of the present disclosure, there is provided an operation method of a web page, the method including:
when a touch event aiming at a webpage is detected, judging whether a touch conflict occurs in the webpage;
when touch conflict occurs in the webpage, displaying a conflict prompt message, wherein the conflict prompt message is used for indicating that touch conflict occurs in the webpage and prompting gesture operation for resetting the touch event;
after the gesture operation of the touch event is reset based on the conflict prompt message, judging whether the gesture operation is detected;
and when the gesture operation is detected, responding to the touch event to realize the operation on the webpage.
Optionally, the determining whether a touch conflict occurs in the webpage includes:
when the touch event is a rolling event, judging whether an overflow area exists in the webpage, wherein the overflow area is an area which is not displayed in the webpage;
when the overflow area exists in the webpage, judging whether the page content of the webpage rolls;
and when the page content of the webpage is not scrolled, determining that the touch conflict occurs in the webpage.
When the touch event is a rolling event, whether an overflow area exists in the webpage is judged, and when the overflow area exists in the webpage, whether touch conflict occurs in the webpage can be effectively judged by judging whether the page content of the webpage rolls, so that the accuracy of judging the touch conflict is improved.
Optionally, the method further comprises:
registering an event receiver in a root window of a browser currently displaying the webpage through an operating system;
accordingly, the determining whether the page content of the web page is scrolled includes:
judging whether the event receiver receives a page rolling notification, wherein the page rolling notification is used for notifying the event receiver that the page content of the webpage rolls;
when the event receiver does not receive the page scrolling notification, determining that the page content of the webpage does not scroll;
when the event receiver receives the page scroll notification, it is determined that the page content of the web page has scrolled.
Since a partial web page area that receives all touch events but does not respond to the touch events generally exists in the web page, the event receiver is registered in the root window of the browser that currently displays the web page, so that the scroll event is received by the event receiver, and the scroll event is prevented from being received by the partial web page area in the web page and then not responding. In addition, whether the page content rolls is judged by judging whether the event receiver receives the page rolling notification, so that the judgment accuracy is improved.
Optionally, the determining whether a touch conflict occurs in the webpage includes:
when the touch event is a content selection event, judging whether page content of an action position of the touch event in the webpage is selected or not;
and when the page content of the action position of the touch event in the webpage is not selected, determining that touch conflict occurs in the webpage.
When the touch event is a content selection event, whether touch conflict occurs in the webpage is judged by judging whether the page content of the action position of the touch event in the webpage is selected, and the accuracy of judging the touch conflict is improved.
Optionally, the method further comprises:
registering an event receiver in a root window of a browser currently displaying the webpage through an operating system;
correspondingly, the determining whether the page content of the action position of the touch event in the webpage is selected includes:
judging whether the event receiver receives a page content selection notification, wherein the page content selection notification is used for notifying the event receiver that the selected page content exists in the webpage;
when the event receiver does not receive the page content selection notification, determining that the page content of the action position of the touch event in the webpage is not selected;
and when the event receiver receives the page content selection notification, determining that the page content of the action position of the touch event in the webpage is selected.
The event receiver is registered in the root window of the browser which currently displays the webpage, so that the event receiver receives the scrolling event, and the condition that the scrolling event cannot be responded after being received by a part of webpage area in the webpage is avoided. In addition, whether the page content of the action position of the touch event is selected or not is judged by judging whether the event receiver receives the page content selection notice or not, and the judgment accuracy is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided an operating apparatus of a web page, the apparatus including:
the first judgment module is used for judging whether touch conflict occurs in the webpage when a touch event aiming at the webpage is detected;
the display module is used for displaying a conflict prompt message when the touch conflict occurs in the webpage, wherein the conflict prompt message is used for indicating that the touch conflict occurs in the webpage and prompting the gesture operation of resetting the touch event;
the second judging module is used for judging whether the gesture operation is detected or not after the gesture operation of the touch event is reset based on the conflict prompt message;
and the response module is used for responding to the touch event when the gesture operation is detected so as to realize the operation on the webpage.
Optionally, the first determining module includes:
the first judgment submodule is used for judging whether an overflow area exists in the webpage or not when the touch event is a rolling event, wherein the overflow area is an area which is not displayed in the webpage;
the second judgment submodule is used for judging whether the page content of the webpage rolls or not when an overflow area exists in the webpage;
the first determining submodule determines that a touch conflict occurs in the webpage when the page content of the webpage is not scrolled.
Optionally, the apparatus further comprises:
the first registration module is used for registering the event receiver in a root window of a browser which currently displays the webpage through an operating system;
accordingly, the second determination submodule is configured to:
judging whether the event receiver receives a page rolling notification, wherein the page rolling notification is used for notifying the event receiver that the page content of the webpage rolls;
when the event receiver does not receive the page scrolling notification, determining that the page content of the webpage does not scroll;
when the event receiver receives the page scroll notification, it is determined that the page content of the web page has scrolled.
Optionally, the first determining module includes:
the third judgment submodule is used for judging whether the page content of the action position of the touch event in the webpage is selected or not when the touch event is a content selection event;
and the second determining submodule is used for determining that touch conflict occurs in the webpage when the page content of the action position of the touch event in the webpage is not selected.
Optionally, the apparatus further comprises:
the second registration module is used for registering the event receiver in a root window of a browser which currently displays the webpage through an operating system;
correspondingly, the third determining submodule is configured to:
judging whether the event receiver receives a page content selection notification, wherein the page content selection notification is used for notifying the event receiver that the selected page content exists in the webpage;
when the event receiver does not receive the page content selection notification, determining that the page content of the action position of the touch event in the webpage is not selected;
and when the event receiver receives the page content selection notification, determining that the page content of the action position of the touch event in the webpage is selected.
According to a third aspect of the embodiments of the present disclosure, there is provided an operation apparatus of a web page, the apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a touch event aiming at a webpage is detected, judging whether a touch conflict occurs in the webpage;
when touch conflict occurs in the webpage, displaying a conflict prompt message, wherein the conflict prompt message is used for indicating that touch conflict occurs in the webpage and prompting gesture operation for resetting the touch event;
after the gesture operation of the touch event is reset based on the conflict prompt message, judging whether the gesture operation is detected;
and when the gesture operation is detected, responding to the touch event to realize the operation on the webpage.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when a touch event aiming at a webpage is detected, judging whether the webpage has a touch conflict or not, indicating a user to reset the gesture operation of the touch event by displaying a conflict prompt message after the fact that the webpage has the touch conflict is determined, detecting the gesture operation after the gesture operation of the touch event is reset, and realizing the operation on the webpage according to the detected reset gesture operation, so that when the user has the touch conflict in the webpage, the user can smoothly realize the operation on the webpage by touching a touch screen, and the convenience of user interaction is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart illustrating a method of operation of a web page in accordance with an exemplary embodiment.
FIG. 2 is a flowchart illustrating a method of operation of a web page in accordance with an exemplary embodiment.
FIG. 3A is a block diagram illustrating an operating device of a web page in accordance with one illustrative embodiment.
FIG. 3B is a block diagram illustrating a first determination module in accordance with an exemplary embodiment.
FIG. 3C is a block diagram illustrating an operating device of a web page in accordance with an exemplary embodiment.
FIG. 3D is a block diagram illustrating another first determination module, according to an example embodiment.
FIG. 4 is a block diagram illustrating an operating device of a web page in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Before explaining the embodiments of the present disclosure in detail, an application scenario of the embodiments of the present disclosure will be described. Since in the related art, a partial web page area that receives all touch events but does not respond to the touch events usually exists in a web page displayed by a browser installed in the mobile terminal, for convenience of description, the partial web page area that receives all touch events but does not respond to the touch events is called a touch conflict area, and when a touch event is detected in the touch conflict area, the mobile terminal sends the touch event to a corresponding page element in the web page through the browser to process the touch conflict, thereby causing a user to be difficult to trigger the touch event to implement an operation on the web page by touching the touch screen in the touch conflict area, the embodiment provides an operation method of the web page, which solves the problem that the web page is difficult to operate by the touch event in the touch conflict area, and enables the user to smoothly complete the operation on the web page in the touch conflict area, the convenience of the user operation is enhanced.
Fig. 1 is a flowchart illustrating an operation method of a web page according to an exemplary embodiment, where the operation method of the web page is used in a mobile terminal, as shown in fig. 1, and includes the following steps:
in step 101, when a touch event for a web page is detected, it is determined whether a touch conflict occurs in the web page.
In step 102, when a touch conflict occurs in the web page, a conflict prompt message is displayed, where the conflict prompt message is used to indicate that a touch conflict occurs in the web page and prompt a gesture operation for resetting the touch event.
In step 103, after the gesture operation of the touch event is reset based on the conflict alert message, it is determined whether the gesture operation is detected.
In step 104, when the gesture operation is detected, responding to the touch event to implement the operation on the web page.
In the embodiment of the disclosure, when a touch event for a webpage is detected, whether the webpage has a touch conflict is judged, and after the touch conflict is determined to occur in the webpage, the user is instructed to reset the gesture operation of the touch event by displaying a conflict prompt message, and then after the gesture operation of the touch event is reset, the gesture operation is detected, and the operation on the webpage is realized according to the detected reset gesture operation, so that when the user has a touch conflict in the webpage, the operation on the webpage can be smoothly realized by touching the touch screen, and the convenience of the user operation is enhanced.
Optionally, determining whether a touch conflict occurs in the webpage includes:
when the touch event is a rolling event, judging whether an overflow area exists in the webpage, wherein the overflow area is an area which is not displayed in the webpage;
when the overflow area exists in the webpage, judging whether the page content of the webpage rolls;
and when the page content of the webpage is not scrolled, determining that the touch conflict occurs in the webpage.
Optionally, the method further comprises:
registering an event receiver in a root window of a browser currently displaying the webpage through an operating system;
accordingly, determining whether the page content of the web page has scrolled includes:
judging whether the event receiver receives a page rolling notification, wherein the page rolling notification is used for notifying the event receiver that the page content of the webpage rolls;
when the event receiver does not receive the page scrolling notification, determining that the page content of the webpage does not scroll;
when the event receiver receives a page scroll notification, it determines that the page content of the web page has scrolled.
Optionally, determining whether a touch conflict occurs in the web page includes:
when the touch event is a content selection event, judging whether page content of an action position of the touch event in the webpage is selected;
and when the page content of the action position of the touch event in the webpage is not selected, determining that touch conflict occurs in the webpage.
Optionally, the method further comprises:
registering an event receiver in a root window of a browser currently displaying the webpage through an operating system;
correspondingly, judging whether the page content of the action position of the touch event in the webpage is selected includes:
judging whether the event receiver receives a page content selection notification, wherein the page content selection notification is used for notifying the event receiver that the selected page content exists in the webpage;
when the event receiver does not receive the page content selection notification, determining that the page content of the action position of the touch event in the webpage is not selected;
and when the event receiver receives the page content selection notification, determining that the page content of the action position of the touch event in the webpage is selected.
All the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present disclosure, and the embodiments of the present disclosure are not described in detail again.
Fig. 2 is a diagram illustrating an operation method of a web page according to an exemplary embodiment, where the operation method of the web page is used in a mobile terminal, as shown in fig. 2, and includes the following steps:
in step 201, an event receiver is registered in a root window of a browser currently displaying the web page by an operating system.
Because a touch conflict area exists in a webpage, the touch conflict area receives all touch events but does not respond to the touch events, and for the touch conflicts, the mobile terminal firstly registers an event receiver in a root window of a browser which currently displays the webpage through an operating system, and the event receiver can be used for receiving the touch events, so that the situation that the touch events cannot respond after being received by the touch conflict area is avoided.
Further, in order to display the web page, the mobile terminal is installed with a browser, and the browser is operated based on an operating system of the mobile terminal, so that the process of registering the event receiver in the root window of the browser currently displaying the web page by the mobile terminal through the operating system may be: the browser sends a registration request to an operating system of the mobile terminal, and the operating system generates a registration file of the event receiver after receiving the registration request so as to complete registration of the event receiver.
The registration request is used for instructing the mobile terminal to register the event receiver in a root window of the browser through an operating system, wherein the root window of the browser is the root window of the browser which currently displays the webpage.
It should be noted that, when multiple windows opened by a browser in a mobile terminal are displayed in a hierarchical structure, a root window of the browser may be a root in the hierarchical structure, that is, other windows are generated based on the root window of the browser.
It should be further noted that the mobile terminal may perform registration of the event receiver when the browser displays the web page, may also perform registration of the event receiver when a touch event for the web page is detected, and of course, may also perform registration at other occasions, such as when an operating system is detected to be in an idle state, or when a browser is detected to be started, and the like, which is not specifically limited in this embodiment of the disclosure.
In step 202, when a touch event for the web page is detected, it is determined whether a touch conflict occurs in the web page.
The mobile terminal may be correspondingly provided with different gesture operations for different touch events, for example, a gesture operation sliding along the longitudinal direction of the touch screen may trigger a scrolling event, a gesture operation dragging after pressing a certain fixed position of the touch screen for a long time may trigger a content selection event, and the like. Therefore, when the mobile terminal detects a gesture operation, whether the detected gesture operation is the same as the set gesture operation is judged, when the detected gesture operation is the same as the set gesture operation, it is determined that a touch event for the webpage is detected, otherwise, it is determined that the touch event for the webpage is not detected. The detected gesture operation can be a gesture operation generated by a user through touching the touch screen.
It should be noted that the detected gesture operation is the same as the set gesture operation, and the detected gesture operation trajectory may be identical to the set gesture operation trajectory.
It should be further noted that the touch event may include a scroll event, a content selection event, and the like, which is not specifically limited in this disclosure.
In this embodiment of the present disclosure, since the touch event may include a scroll event, a content selection event, and the like, when the touch event for the web page is detected, for different touch events, determining whether a touch conflict occurs in the web page may include the following two implementation manners:
the first implementation mode comprises the following steps: when the detected touch event is a rolling event, judging whether an overflow area exists in the webpage, when the overflow area exists in the webpage, judging whether the page content of the webpage rolls, and when the page content of the webpage does not roll, determining that touch conflict occurs in the webpage.
Further, when the overflow area does not exist in the webpage, it is determined that no touch conflict occurs in the webpage. Or when the overflow area exists in the webpage and the page content of the webpage is scrolled, determining that no touch conflict occurs in the webpage.
The mobile terminal can judge whether the overflow area exists in the webpage through the following two strategies:
the first strategy is: acquiring the size of a webpage, judging whether the size of a touch screen is larger than the size of the webpage or not, and determining that no overflow area exists in the webpage when the size of the touch screen is larger than the size of the webpage; and when the size of the touch screen is smaller than or equal to that of the webpage, determining that an overflow area exists in the webpage.
It should be noted that, in the embodiment of the present disclosure, the overflow area is an undisplayed area except for the currently displayed area in the web page when the content in the web page cannot be displayed on the touch screen all at once. For example, when the size of the web page is larger than the size of the touch screen, the remaining undisplayed area of the web page except the area displayed in the size range of the current touch screen is the overflow area in the web page.
The second strategy is: judging whether a scroll bar is displayed in a window for displaying the webpage currently, if so, determining that an overflow area exists in the webpage, otherwise, determining that the overflow area does not exist in the webpage.
The scroll bar can be a bar displayed on the side edge of the webpage when the size of the webpage is larger than that of the touch screen, and the mobile terminal can scroll the content of the webpage by moving the scroll bar, so that an undisplayed overflow area is displayed on the touch screen.
It should be noted that, the mobile terminal may not only determine whether an overflow area exists in the web page through the two strategies, but also may implement the overflow area in other manners, and this is not specifically limited in this embodiment of the disclosure.
The implementation process of the mobile terminal determining whether the page content of the webpage rolls may be as follows: and judging whether the event receiver receives the page rolling notification, determining that the page content of the webpage rolls when the event receiver receives the page rolling notification, and determining that the page content of the webpage does not roll when the event receiver does not receive the page rolling notification. Wherein the page scroll notification is used to notify the event receiver that the page content of the web page has scrolled.
Further, when a scroll bar is displayed in a window currently displaying the web page, the mobile terminal may determine whether a position of the scroll bar is changed, determine to send a page scroll notification to the event receiver when the position of the scroll bar is changed, and determine not to send the page scroll notification to the event receiver when the position of the scroll bar is not changed.
The second implementation mode comprises the following steps: when the detected touch event is a content selection event, judging whether the page content at the action position of the touch event in the webpage is selected, and when the page content at the action position of the touch event in the webpage is not selected, determining that touch conflict occurs in the webpage. And when the page content at the action position of the touch event in the webpage is selected, determining that no touch conflict occurs in the webpage.
The implementation process of the mobile terminal determining whether the page content of the action position of the touch event in the webpage is selected may be as follows: judging whether the event receiver receives a page content selection notice, determining that the page content at the action position of the touch event in the webpage is selected when the event receiver receives the page content selection notice, and determining that the page content at the action position of the touch event in the webpage is not selected when the event receiver does not receive the page content selection notice. The page content selection notification is used for notifying the event receiver that the selected page content exists in the webpage.
It should be noted that the content selection event may be a touch event triggered by long pressing the touch screen and dragging the cursor, and the content selection event is used to select the page content at the action position.
In step 203, when a touch conflict occurs in the web page, a conflict prompt message is displayed, where the conflict prompt message is used to indicate that a touch conflict occurs in the web page and prompt a gesture operation for resetting the touch event.
When the mobile terminal displays the conflict alert message, the conflict alert message may be displayed on the currently displayed web page in a form of a message box, or may be displayed in a notification bar of the mobile terminal in a form of push, and of course, the user may also be prompted by setting a dialog box, and the gesture operation of the touch event is reset based on the feedback of the user, which is not specifically limited in the embodiment of the present disclosure.
When the conflict alert message is displayed on the currently displayed web page in the form of a message box or a dialog box, the message box or the dialog box may be located at the center of the web page or at other positions besides the center, which is not limited in this disclosure.
It should be noted that the conflict prompting message is used to indicate that a touch conflict occurs in the web page and prompt the gesture operation of resetting the touch event, and the conflict prompting message may carry information of the reset gesture operation. The resetting of the gesture operation of the touch event may be based on the information of the reset gesture operation carried in the conflict prompting message, or may be accomplished by the user through self-setting and inputting of the gesture operation by the mobile terminal.
Therefore, the mobile terminal determines whether a touch conflict occurs in the webpage according to the touch event detected in the webpage, and when it is determined that the touch conflict occurs in the webpage, the mobile terminal prompts the gesture operation of resetting the touch event by displaying a conflict prompt message, and based on the gesture operation of the reset touch event, the mobile terminal can implement the operation on the webpage through step 204 and step 205.
In step 204, after the gesture operation of the touch event is reset based on the conflict alert message, it is determined whether the gesture operation is detected.
And after the gesture operation of the touch event is reset based on the conflict prompt message, the mobile terminal detects the gesture operation, and after the gesture operation is detected, whether the detected gesture operation is the same as the reset gesture operation of the touch event is judged. When it is determined that the detected gesture operation is the same as the reset gesture operation of the touch event, step 205 is performed. The detected gesture operation can be a gesture operation generated by a user through touching the touch screen.
The detected gesture operation is the same as the reset gesture operation, and the action track of the touch screen can be matched with the set gesture operation track.
In step 205, when the gesture operation is detected, the touch event is responded to implement the operation on the web page.
And when the reset gesture operation is detected, responding to the touch event corresponding to the gesture operation based on the gesture operation. The method for the mobile terminal to respond to the touch event based on the gesture operation may refer to a method for the mobile terminal to respond to other events according to the gesture operation in the related art, which is not described in detail in the embodiments of the present disclosure.
In the embodiment of the disclosure, when a touch event for a webpage is detected, whether the webpage has a touch conflict is judged, and after the touch conflict is determined to occur in the webpage, the user is instructed to reset the gesture operation of the touch event by displaying a conflict prompt message, and then after the gesture operation of the touch event is reset, the gesture operation is detected, and the operation on the webpage is realized according to the detected reset gesture operation, so that when the user has a touch conflict in the webpage, the operation on the webpage can be smoothly realized by touching the touch screen, and the convenience of the user operation is enhanced.
FIG. 3A is a block diagram illustrating an apparatus 300 for operating a web page in accordance with an exemplary embodiment. Referring to fig. 3A, the apparatus includes a first judging module 301, a display module 302, a second judging module 303, and a response module 304.
The first determining module 301 is configured to determine whether a touch conflict occurs in a web page when a touch event for the web page is detected;
a display module 302, configured to display a conflict prompt message when a touch conflict occurs in the web page, where the conflict prompt message is used to indicate that a touch conflict occurs in the web page and prompt a gesture operation for resetting the touch event;
a second determining module 303, configured to determine whether the gesture operation is detected after the gesture operation of the touch event is reset based on the conflict alert message;
the response module 304 is configured to respond to the touch event when the gesture operation is detected, so as to implement an operation on the web page.
Alternatively, referring to fig. 3B, the first determining module 301 includes:
a first determining sub-module 3011, configured to determine whether an overflow area exists in the web page when the touch event is a scroll event, where the overflow area is an area not displayed in the web page;
a second determining sub-module 3012, configured to determine whether the page content of the web page scrolls when an overflow area exists in the web page;
the first determining sub-module 3013 determines that a touch conflict occurs in the web page when the page content of the web page is not scrolled.
Optionally, referring to fig. 3C, the operation device 300 of the web page further includes:
a first registration module 305 for registering an event receiver in a root window of a browser currently displaying the web page through an operating system;
accordingly, the second determination submodule is configured to:
judging whether the event receiver receives a page rolling notification, wherein the page rolling notification is used for notifying the event receiver that the page content of the webpage rolls;
when the event receiver does not receive the page scrolling notification, determining that the page content of the webpage does not scroll;
when the event receiver receives the page scroll notification, it determines that the page content of the web page has scrolled.
Optionally, referring to fig. 3D, the first determining module 301 includes:
the third determining sub-module 3014, configured to determine, when the touch event is a content selection event, whether page content of an action position of the touch event in the web page is selected;
the second determining sub-module 3015 is configured to determine that a touch conflict occurs in the web page when the page content of the action position of the touch event in the web page is not selected.
Optionally, the operation device 300 of the web page further includes:
the second registration module is used for registering the event receiver in a root window of a browser which currently displays the webpage through an operating system;
accordingly, the third determining submodule is configured to:
judging whether the event receiver receives a page content selection notification, wherein the page content selection notification is used for notifying the event receiver that the selected page content exists in the webpage;
when the event receiver does not receive the page content selection notification, determining that the page content of the action position of the touch event in the webpage is not selected;
and when the event receiver receives the page content selection notification, determining that the page content of the action position of the touch event in the webpage is selected.
In the embodiment of the disclosure, when a touch event for a webpage is detected, whether the webpage has a touch conflict is judged, and after the touch conflict is determined to occur in the webpage, the user is instructed to reset the gesture operation of the touch event by displaying a conflict prompt message, and then after the gesture operation of the touch event is reset, the gesture operation is detected, and the operation on the webpage is realized according to the detected reset gesture operation, so that when the user has a touch conflict in the webpage, the operation on the webpage can be smoothly realized by touching the touch screen, and the convenience of the user operation is enhanced.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 4 is a block diagram illustrating an apparatus 400 for operation of a web page in accordance with an exemplary embodiment. For example, the apparatus 400 may be a mobile terminal such as a mobile phone, tablet device, or the like.
Referring to fig. 4, the apparatus 400 may include one or more of the following components: processing components 402, memory 404, power components 406, multimedia components 408, audio components 410, input/output (I/O) interfaces 412, sensor components 414, and communication components 416.
The processing component 402 generally controls overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the apparatus 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply components 406 provide power to the various components of device 400. The power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power supplies for the apparatus 400.
The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 400 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, audio component 410 includes a Microphone (MIC) configured to receive external audio signals when apparatus 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the apparatus 400. For example, the sensor assembly 414 may detect an open/closed state of the apparatus 400, the relative positioning of the components, such as a display and keypad of the apparatus 400, the sensor assembly 414 may also detect a change in the position of the apparatus 400 or a component of the apparatus 400, the presence or absence of user contact with the apparatus 400, orientation or acceleration/deceleration of the apparatus 400, and a change in the temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The apparatus 400 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the apparatus 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of operating a web page, the method comprising:
when a touch event aiming at a webpage is detected, judging whether a touch conflict occurs in the webpage;
when touch conflict occurs in the webpage, displaying a conflict prompt message, wherein the conflict prompt message is used for indicating that the touch conflict occurs in the webpage and prompting the gesture operation of resetting the touch event;
after the gesture operation of the touch event is reset based on the conflict prompt message, judging whether the gesture operation is detected;
and when the gesture operation is detected, responding to the touch event to realize the operation on the webpage.
Optionally, determining whether a touch conflict occurs in the webpage includes:
when the touch event is a rolling event, judging whether an overflow area exists in the webpage, wherein the overflow area is an area which is not displayed in the webpage;
when the overflow area exists in the webpage, judging whether the page content of the webpage rolls;
and when the page content of the webpage is not scrolled, determining that the touch conflict occurs in the webpage.
Optionally, the method further comprises:
registering an event receiver in a root window of a browser currently displaying the webpage through an operating system;
accordingly, determining whether the page content of the web page has scrolled includes:
judging whether the event receiver receives a page rolling notification, wherein the page rolling notification is used for notifying the event receiver that the page content of the webpage rolls;
when the event receiver does not receive the page scrolling notification, determining that the page content of the webpage does not scroll;
when the event receiver receives a page scroll notification, it determines that the page content of the web page has scrolled.
Optionally, determining whether a touch conflict occurs in the web page includes:
when the touch event is a content selection event, judging whether page content of an action position of the touch event in the webpage is selected;
and when the page content of the action position of the touch event in the webpage is not selected, determining that touch conflict occurs in the webpage.
Optionally, the method further comprises:
registering an event receiver in a root window of a browser currently displaying the webpage through an operating system;
correspondingly, judging whether the page content of the action position of the touch event in the webpage is selected includes:
judging whether the event receiver receives a page content selection notification, wherein the page content selection notification is used for notifying the event receiver that the selected page content exists in the webpage;
when the event receiver does not receive the page content selection notification, determining that the page content of the action position of the touch event in the webpage is not selected;
and when the event receiver receives the page content selection notification, determining that the page content of the action position of the touch event in the webpage is selected.
In the embodiment of the disclosure, when a touch event for a webpage is detected, whether the webpage has a touch conflict is judged, and after the touch conflict is determined to occur in the webpage, the user is instructed to reset the gesture operation of the touch event by displaying a conflict prompt message, and then after the gesture operation of the touch event is reset, the gesture operation is detected, and the operation on the webpage is realized according to the detected reset gesture operation, so that when the user has a touch conflict in the webpage, the operation on the webpage can be smoothly realized by touching the touch screen, and the convenience of the user operation is enhanced.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (7)

1. A method of operating a web page, the method comprising:
when gesture operation is detected, judging whether the detected gesture operation is the same as the set gesture operation, when the detected gesture operation is the same as the set gesture operation, determining that a touch event aiming at a webpage is detected, and when the touch event aiming at the webpage is detected, judging whether touch conflict occurs in the webpage;
when touch conflict occurs in the webpage, displaying a conflict prompt message, wherein the conflict prompt message is used for indicating that touch conflict occurs in the webpage and prompting gesture operation for resetting the touch event;
after the gesture operation of the touch event is reset based on the conflict prompt message, judging whether the gesture operation is detected;
when the gesture operation is detected, responding to the touch event to realize the operation on the webpage;
wherein, the determining whether the touch conflict occurs in the webpage includes:
when the touch event is a rolling event, judging whether an overflow area exists in the webpage, wherein the overflow area is an area which is not displayed in the webpage; when the overflow area exists in the webpage, judging whether the page content of the webpage rolls; when the page content of the webpage is not scrolled, determining that a touch conflict occurs in the webpage; alternatively, the first and second electrodes may be,
when the touch event is a content selection event, judging whether page content of an action position of the touch event in the webpage is selected or not; and when the page content of the action position of the touch event in the webpage is not selected, determining that touch conflict occurs in the webpage.
2. The method of claim 1, wherein the method further comprises:
registering an event receiver in a root window of a browser currently displaying the webpage through an operating system;
accordingly, the determining whether the page content of the web page is scrolled includes:
judging whether the event receiver receives a page rolling notification, wherein the page rolling notification is used for notifying the event receiver that the page content of the webpage rolls;
when the event receiver does not receive the page scrolling notification, determining that the page content of the webpage does not scroll;
when the event receiver receives the page scroll notification, it is determined that the page content of the web page has scrolled.
3. The method of claim 1, wherein the method further comprises:
registering an event receiver in a root window of a browser currently displaying the webpage through an operating system;
correspondingly, the determining whether the page content of the action position of the touch event in the webpage is selected includes:
judging whether the event receiver receives a page content selection notification, wherein the page content selection notification is used for notifying the event receiver that the selected page content exists in the webpage;
when the event receiver does not receive the page content selection notification, determining that the page content of the action position of the touch event in the webpage is not selected;
and when the event receiver receives the page content selection notification, determining that the page content of the action position of the touch event in the webpage is selected.
4. An apparatus for operating a web page, the apparatus comprising:
the first judgment module is used for judging whether the detected gesture operation is the same as the set gesture operation or not when the gesture operation is detected, determining that a touch event aiming at a webpage is detected when the detected gesture operation is the same as the set gesture operation, and judging whether a touch conflict occurs in the webpage or not when the touch event aiming at the webpage is detected;
the display module is used for displaying a conflict prompt message when the touch conflict occurs in the webpage, wherein the conflict prompt message is used for indicating that the touch conflict occurs in the webpage and prompting the gesture operation of resetting the touch event;
the second judging module is used for judging whether the gesture operation is detected or not after the gesture operation of the touch event is reset based on the conflict prompt message;
the response module is used for responding to the touch event when the gesture operation is detected so as to realize the operation on the webpage;
wherein, the first judging module comprises:
the first judgment submodule is used for judging whether an overflow area exists in the webpage or not when the touch event is a rolling event, wherein the overflow area is an area which is not displayed in the webpage; the second judgment submodule is used for judging whether the page content of the webpage rolls or not when an overflow area exists in the webpage; the first determining submodule determines that touch conflict occurs in the webpage when the page content of the webpage is not scrolled; alternatively, the first and second electrodes may be,
the first judging module comprises:
the third judgment submodule is used for judging whether the page content of the action position of the touch event in the webpage is selected or not when the touch event is a content selection event; and the second determining submodule is used for determining that touch conflict occurs in the webpage when the page content of the action position of the touch event in the webpage is not selected.
5. The apparatus of claim 4, wherein the apparatus further comprises:
the first registration module is used for registering the event receiver in a root window of a browser which currently displays the webpage through an operating system;
accordingly, the second determination submodule is configured to:
judging whether the event receiver receives a page rolling notification, wherein the page rolling notification is used for notifying the event receiver that the page content of the webpage rolls;
when the event receiver does not receive the page scrolling notification, determining that the page content of the webpage does not scroll;
when the event receiver receives the page scroll notification, it is determined that the page content of the web page has scrolled.
6. The apparatus of claim 4, wherein the apparatus further comprises:
the second registration module is used for registering the event receiver in a root window of a browser which currently displays the webpage through an operating system;
correspondingly, the third determining submodule is configured to:
judging whether the event receiver receives a page content selection notification, wherein the page content selection notification is used for notifying the event receiver that the selected page content exists in the webpage;
when the event receiver does not receive the page content selection notification, determining that the page content of the action position of the touch event in the webpage is not selected;
and when the event receiver receives the page content selection notification, determining that the page content of the action position of the touch event in the webpage is selected.
7. An apparatus for operating a web page, the apparatus comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when gesture operation is detected, judging whether the detected gesture operation is the same as the set gesture operation, when the detected gesture operation is the same as the set gesture operation, determining that a touch event aiming at a webpage is detected, and when the touch event aiming at the webpage is detected, judging whether touch conflict occurs in the webpage;
when touch conflict occurs in the webpage, displaying a conflict prompt message, wherein the conflict prompt message is used for indicating that touch conflict occurs in the webpage and prompting gesture operation for resetting the touch event;
after the gesture operation of the touch event is reset based on the conflict prompt message, judging whether the gesture operation is detected;
when the gesture operation is detected, responding to the touch event to realize the operation on the webpage;
wherein, the determining whether the touch conflict occurs in the webpage includes:
when the touch event is a rolling event, judging whether an overflow area exists in the webpage, wherein the overflow area is an area which is not displayed in the webpage; when the overflow area exists in the webpage, judging whether the page content of the webpage rolls; when the page content of the webpage is not scrolled, determining that a touch conflict occurs in the webpage; alternatively, the first and second electrodes may be,
when the touch event is a content selection event, judging whether page content of an action position of the touch event in the webpage is selected or not; and when the page content of the action position of the touch event in the webpage is not selected, determining that touch conflict occurs in the webpage.
CN201610787263.0A 2016-08-30 2016-08-30 Webpage operation method and device Active CN106445376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610787263.0A CN106445376B (en) 2016-08-30 2016-08-30 Webpage operation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610787263.0A CN106445376B (en) 2016-08-30 2016-08-30 Webpage operation method and device

Publications (2)

Publication Number Publication Date
CN106445376A CN106445376A (en) 2017-02-22
CN106445376B true CN106445376B (en) 2020-03-03

Family

ID=58163602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610787263.0A Active CN106445376B (en) 2016-08-30 2016-08-30 Webpage operation method and device

Country Status (1)

Country Link
CN (1) CN106445376B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381746B (en) * 2018-12-27 2021-07-23 北京小米移动软件有限公司 Parameter adjusting method, device and storage medium
CN109817204A (en) * 2019-02-26 2019-05-28 深圳安泰创新科技股份有限公司 Voice interactive method and device, electronic equipment, readable storage medium storing program for executing
CN118051133A (en) * 2022-11-15 2024-05-17 华为技术有限公司 Gesture touch control method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810023A (en) * 2011-06-03 2012-12-05 联想(北京)有限公司 Gesture recognition method and terminal equipment
CN103019444A (en) * 2012-12-09 2013-04-03 广州市动景计算机科技有限公司 Touch operation method of touch screen and touch screen device
CN105892894A (en) * 2015-09-09 2016-08-24 北京奇虎科技有限公司 Screen scroll event conflict processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9229568B2 (en) * 2011-09-30 2016-01-05 Oracle International Corporation Touch device gestures

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810023A (en) * 2011-06-03 2012-12-05 联想(北京)有限公司 Gesture recognition method and terminal equipment
CN103019444A (en) * 2012-12-09 2013-04-03 广州市动景计算机科技有限公司 Touch operation method of touch screen and touch screen device
CN105892894A (en) * 2015-09-09 2016-08-24 北京奇虎科技有限公司 Screen scroll event conflict processing method and device

Also Published As

Publication number Publication date
CN106445376A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN107908351B (en) Application interface display method and device and storage medium
US20180088764A1 (en) Method, apparatus, and storage medium for sharing content
WO2016023341A1 (en) Application program corner mark adding method and apparatus
EP3121701A1 (en) Method and apparatus for single-hand operation on full screen
CN106469054B (en) Notification message control method and device and terminal
US20170060320A1 (en) Method for controlling a mobile terminal using a side touch panel
CN107102772B (en) Touch control method and device
CN107390932B (en) Edge false touch prevention method and device and computer readable storage medium
WO2017084183A1 (en) Information displaying method and device
CN104317402B (en) Description information display method and device and electronic equipment
CN106547461B (en) Operation processing method, device and equipment
CN105487805B (en) Object operation method and device
CN105786507B (en) Display interface switching method and device
EP3731088B1 (en) Method and device for displaying information and storage medium
CN106485660B (en) Electronic map zooming method and device
CN108073328B (en) Touch response method and device
CN111399720A (en) Method and device for displaying application interface and storage medium
CN112269556A (en) Information display method, device, system, equipment, server and storage medium
US20170293494A1 (en) Method and device for starting application interface
CN106445376B (en) Webpage operation method and device
CN107132983B (en) Split-screen window operation method and device
CN108874450B (en) Method and device for waking up voice assistant
CN106325712B (en) Terminal display control method and device and terminal
KR20210005508A (en) Touch signal processing method, apparatus and media
CN109521923B (en) Floating window control method and device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant