[JBoss JIRA] (JBIDE-15790) Adding backbutton listener disables backbutton functionality for all pages
by Ilya Buziuk (JIRA)
[ https://issues.jboss.org/browse/JBIDE-15790?page=com.atlassian.jira.plugi... ]
Ilya Buziuk edited comment on JBIDE-15790 at 10/29/13 1:26 PM:
---------------------------------------------------------------
I think it's not a bug. If you run your code on the device the result will be the same. Assuming that it's not a single page application the back button listener should be added on other pages. Here is the sample that works on both CordovaSim and device:
{code:title=index.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
alert("backbutton event was fired");
}, false);
}
</script>
</head>
<body onload="onLoad()">
<button onclick="window.location = 'index2.html'">go to another page </button>
</body>
</html>
{code}
{code:title=index2.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
window.history.back();
}, false);
}
</script>
</head>
<body onload="onLoad()">
<h1>Second file</h1>
</body>
</html>
{code}
However, I've found that "navigator.app.backHistory()" (in the sample above "window.history.back()" is used instead ) doesn't work in CordovaSim. So I've created the separate issue JBIDE-15814
was (Author: ibuziuk):
I think it's not a bug. If you run your code on the device the result will be the same. Assuming that it's not a single page application the back button listener should be added on other pages. Here is the sample that works on both CordovaSim and device:
{code:title=index.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
alert("backbutton event was fired");
}, false);
}
</script>
</head>
<body onload="onLoad()">
<button onclick="window.location = 'index2.html'">go to another page </button>
</body>
</html>
{code}
{code:title=index2.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
window.history.back();
}, false);
}
</script>
</head>
<body onload="onLoad()">
<h1>Second file</h1>
</body>
</html>
{code}
However I've found that "navigator.app.backHistory()" (in the sample above "window.history.back()" is used instead ) doesn't work in CordovaSim. So I've created the separate issue JBIDE-15814
> Adding backbutton listener disables backbutton functionality for all pages
> --------------------------------------------------------------------------
>
> Key: JBIDE-15790
> URL: https://issues.jboss.org/browse/JBIDE-15790
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: browsersim
> Affects Versions: 4.1.1.Beta1
> Environment: JBT 4.1.1 Beta1-v20131020-0207-B454
> Reporter: Vlado Pakan
> Assignee: Ilya Buziuk
> Fix For: 4.1.1.CR1
>
>
> 1. Create new Hybrid Mobile Project
> 2. Add HTML page defining backbutton listener and link this page from index.html
> {noformat}
> <!DOCTYPE html>
> <html>
> <head>
> <title>Back Button Example</title>
> <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
> <script type="text/javascript" charset="utf-8">
> // Wait for device API libraries to load
> //
> function onLoad() {
> document.addEventListener("deviceready", onDeviceReady, false);
> }
> // device APIs are available
> //
> function onDeviceReady() {
> // Register the event listener
> document.addEventListener("backbutton", onBackKeyDown, false);
> }
> // Handle the back button
> //
> function onBackKeyDown() {
> alert('backbutton event fired');
> }
> </script>
> </head>
> <body onload="onLoad()">
> </body>
> </html>
> {noformat}
> 3. Add another HTML page and link it from index.html
> 4. Run project in CordovaSim
> 5. Navigate to page without backbutton listener and choose button Back
> ASSERT: Button back works index.html page is displayed
> 6. Navigate to page with buttonback listener
> 7. Choose button Back
> ASSERT: Alert box is displayed and no navigation to index.html happened
> 8. Open index.html page using address bar of CordovaSim
> 9. Navigate to page without backbutton listener and choose button Back
> ERROR: Nothing happened
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months
[JBoss JIRA] (JBIDE-15790) Adding backbutton listener disables backbutton functionality for all pages
by Ilya Buziuk (JIRA)
[ https://issues.jboss.org/browse/JBIDE-15790?page=com.atlassian.jira.plugi... ]
Ilya Buziuk edited comment on JBIDE-15790 at 10/29/13 1:24 PM:
---------------------------------------------------------------
I think it's not a bug. If you run your code on the device the result will be the same. Assuming that it's not a single page application the back button listener should be added on other pages. Here is the sample that works on both CordovaSim and device:
{code:title=index.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
alert("backbutton event was fired");
}, false);
}
</script>
</head>
<body onload="onLoad()">
<button onclick="window.location = 'index2.html'">go to another page </button>
</body>
</html>
{code}
{code:title=index2.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
window.history.back();
}, false);
}
</script>
</head>
<body onload="onLoad()">
<h1>Second file</h1>
</body>
</html>
{code}
However I've found that "navigator.app.backHistory()" (in the sample above "window.history.back()" is used instead ) doesn't work in CordovaSim. So I've created the separate issue JBIDE-15814
was (Author: ibuziuk):
I think it's not a bug. If you run your code on the device the result will be the same. Assuming that it's not a single page application the back button listener should be added on other pages. Here is the sample that works on both CordovaSim and device:
{code:title=index.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
alert("backbutton event was fired");
}, false);
}
</script>
</head>
<body onload="onLoad()">
<button onclick="window.location = 'index2.html'">go to another page </button>
</body>
</html>
{code}
{code:title=index2.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
window.history.back();
}, false);
}
</script>
</head>
<body onload="onLoad()">
<h1>Second file</h1>
</body>
</html>
{code}
However, I've found that "navigator.app.backHistory()" (in the sample above "window.history.back()" is used instead ) doesn't work in CordovaSim. So I've created the separate issue JBIDE-15814
> Adding backbutton listener disables backbutton functionality for all pages
> --------------------------------------------------------------------------
>
> Key: JBIDE-15790
> URL: https://issues.jboss.org/browse/JBIDE-15790
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: browsersim
> Affects Versions: 4.1.1.Beta1
> Environment: JBT 4.1.1 Beta1-v20131020-0207-B454
> Reporter: Vlado Pakan
> Assignee: Ilya Buziuk
> Fix For: 4.1.1.CR1
>
>
> 1. Create new Hybrid Mobile Project
> 2. Add HTML page defining backbutton listener and link this page from index.html
> {noformat}
> <!DOCTYPE html>
> <html>
> <head>
> <title>Back Button Example</title>
> <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
> <script type="text/javascript" charset="utf-8">
> // Wait for device API libraries to load
> //
> function onLoad() {
> document.addEventListener("deviceready", onDeviceReady, false);
> }
> // device APIs are available
> //
> function onDeviceReady() {
> // Register the event listener
> document.addEventListener("backbutton", onBackKeyDown, false);
> }
> // Handle the back button
> //
> function onBackKeyDown() {
> alert('backbutton event fired');
> }
> </script>
> </head>
> <body onload="onLoad()">
> </body>
> </html>
> {noformat}
> 3. Add another HTML page and link it from index.html
> 4. Run project in CordovaSim
> 5. Navigate to page without backbutton listener and choose button Back
> ASSERT: Button back works index.html page is displayed
> 6. Navigate to page with buttonback listener
> 7. Choose button Back
> ASSERT: Alert box is displayed and no navigation to index.html happened
> 8. Open index.html page using address bar of CordovaSim
> 9. Navigate to page without backbutton listener and choose button Back
> ERROR: Nothing happened
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months
[JBoss JIRA] (JBIDE-15790) Adding backbutton listener disables backbutton functionality for all pages
by Ilya Buziuk (JIRA)
[ https://issues.jboss.org/browse/JBIDE-15790?page=com.atlassian.jira.plugi... ]
Ilya Buziuk resolved JBIDE-15790.
---------------------------------
Resolution: Rejected
not a bug
> Adding backbutton listener disables backbutton functionality for all pages
> --------------------------------------------------------------------------
>
> Key: JBIDE-15790
> URL: https://issues.jboss.org/browse/JBIDE-15790
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: browsersim
> Affects Versions: 4.1.1.Beta1
> Environment: JBT 4.1.1 Beta1-v20131020-0207-B454
> Reporter: Vlado Pakan
> Assignee: Ilya Buziuk
> Fix For: 4.1.1.CR1
>
>
> 1. Create new Hybrid Mobile Project
> 2. Add HTML page defining backbutton listener and link this page from index.html
> {noformat}
> <!DOCTYPE html>
> <html>
> <head>
> <title>Back Button Example</title>
> <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
> <script type="text/javascript" charset="utf-8">
> // Wait for device API libraries to load
> //
> function onLoad() {
> document.addEventListener("deviceready", onDeviceReady, false);
> }
> // device APIs are available
> //
> function onDeviceReady() {
> // Register the event listener
> document.addEventListener("backbutton", onBackKeyDown, false);
> }
> // Handle the back button
> //
> function onBackKeyDown() {
> alert('backbutton event fired');
> }
> </script>
> </head>
> <body onload="onLoad()">
> </body>
> </html>
> {noformat}
> 3. Add another HTML page and link it from index.html
> 4. Run project in CordovaSim
> 5. Navigate to page without backbutton listener and choose button Back
> ASSERT: Button back works index.html page is displayed
> 6. Navigate to page with buttonback listener
> 7. Choose button Back
> ASSERT: Alert box is displayed and no navigation to index.html happened
> 8. Open index.html page using address bar of CordovaSim
> 9. Navigate to page without backbutton listener and choose button Back
> ERROR: Nothing happened
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months
[JBoss JIRA] (JBIDE-15790) Adding backbutton listener disables backbutton functionality for all pages
by Ilya Buziuk (JIRA)
[ https://issues.jboss.org/browse/JBIDE-15790?page=com.atlassian.jira.plugi... ]
Ilya Buziuk commented on JBIDE-15790:
-------------------------------------
I think it's not a bug. If you run your code on the device the result will be the same. Assuming that it's not a single page application the back button listener should be added on other pages. Here is the sample that works on both CordovaSim and device:
{code:title=index.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
alert("backbutton event was fired");
}, false);
}
</script>
</head>
<body onload="onLoad()">
<button onclick="window.location = 'index2.html'">go to another page </button>
</body>
</html>
{code}
{code:title=index2.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Back Button Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
document.addEventListener("backbutton", function(e) {
window.history.back();
}, false);
}
</script>
</head>
<body onload="onLoad()">
<h1>Second file</h1>
</body>
</html>
{code}
However, I've found that "navigator.app.backHistory()" (in the sample above "window.history.back()" is used instead ) doesn't work in CordovaSim. So I've created the separate issue JBIDE-15814
> Adding backbutton listener disables backbutton functionality for all pages
> --------------------------------------------------------------------------
>
> Key: JBIDE-15790
> URL: https://issues.jboss.org/browse/JBIDE-15790
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: browsersim
> Affects Versions: 4.1.1.Beta1
> Environment: JBT 4.1.1 Beta1-v20131020-0207-B454
> Reporter: Vlado Pakan
> Assignee: Ilya Buziuk
> Fix For: 4.1.1.CR1
>
>
> 1. Create new Hybrid Mobile Project
> 2. Add HTML page defining backbutton listener and link this page from index.html
> {noformat}
> <!DOCTYPE html>
> <html>
> <head>
> <title>Back Button Example</title>
> <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
> <script type="text/javascript" charset="utf-8">
> // Wait for device API libraries to load
> //
> function onLoad() {
> document.addEventListener("deviceready", onDeviceReady, false);
> }
> // device APIs are available
> //
> function onDeviceReady() {
> // Register the event listener
> document.addEventListener("backbutton", onBackKeyDown, false);
> }
> // Handle the back button
> //
> function onBackKeyDown() {
> alert('backbutton event fired');
> }
> </script>
> </head>
> <body onload="onLoad()">
> </body>
> </html>
> {noformat}
> 3. Add another HTML page and link it from index.html
> 4. Run project in CordovaSim
> 5. Navigate to page without backbutton listener and choose button Back
> ASSERT: Button back works index.html page is displayed
> 6. Navigate to page with buttonback listener
> 7. Choose button Back
> ASSERT: Alert box is displayed and no navigation to index.html happened
> 8. Open index.html page using address bar of CordovaSim
> 9. Navigate to page without backbutton listener and choose button Back
> ERROR: Nothing happened
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months
[JBoss JIRA] (JBIDE-15789) Renaming HTML file doesn't change editor title
by Victor Rubezhny (JIRA)
[ https://issues.jboss.org/browse/JBIDE-15789?page=com.atlassian.jira.plugi... ]
Victor Rubezhny edited comment on JBIDE-15789 at 10/29/13 1:09 PM:
-------------------------------------------------------------------
[~vpakan] and do you have any error stuff in .log? (If there is some exceptions, please attach your .log)
And probably the last question. Could you add an output of "java -version" here?
was (Author: vrubezhny):
[~vpakan] and do you have any error stuff in .log? (If there is some exceptions, please attach your .log)
> Renaming HTML file doesn't change editor title
> ----------------------------------------------
>
> Key: JBIDE-15789
> URL: https://issues.jboss.org/browse/JBIDE-15789
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: jsp/jsf/xml/html source editing
> Affects Versions: 4.1.1.Beta1
> Environment: JBT 4.1.1 Beta1-v20131020-0207-B454 Linux KDE
> Reporter: Vlado Pakan
> Assignee: Victor Rubezhny
> Fix For: 4.2.x
>
>
> 1. Create project with HTML file
> 2. Open HTML file in VPE
> 3. Rename HTML file in Package Explorer
> ASSERT: File is renamed in Package Explorer
> ERROR: Editor title of opened HTML file is not changed
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months
[JBoss JIRA] (JBIDE-15789) Renaming HTML file doesn't change editor title
by Victor Rubezhny (JIRA)
[ https://issues.jboss.org/browse/JBIDE-15789?page=com.atlassian.jira.plugi... ]
Victor Rubezhny commented on JBIDE-15789:
-----------------------------------------
[~vpakan] and do you have any error stuff in .log? (If there is some exceptions, please attach your .log)
> Renaming HTML file doesn't change editor title
> ----------------------------------------------
>
> Key: JBIDE-15789
> URL: https://issues.jboss.org/browse/JBIDE-15789
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: jsp/jsf/xml/html source editing
> Affects Versions: 4.1.1.Beta1
> Environment: JBT 4.1.1 Beta1-v20131020-0207-B454 Linux KDE
> Reporter: Vlado Pakan
> Assignee: Victor Rubezhny
> Fix For: 4.2.x
>
>
> 1. Create project with HTML file
> 2. Open HTML file in VPE
> 3. Rename HTML file in Package Explorer
> ASSERT: File is renamed in Package Explorer
> ERROR: Editor title of opened HTML file is not changed
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months
[JBoss JIRA] (JBIDE-15789) Renaming HTML file doesn't change editor title
by Vlado Pakan (JIRA)
[ https://issues.jboss.org/browse/JBIDE-15789?page=com.atlassian.jira.plugi... ]
Vlado Pakan commented on JBIDE-15789:
-------------------------------------
On the JBDS installer page is written that 4.31.1.Alpha1 TP was used but I don't know how to confirm that.
Eclipse Platform Feature is v. 4.3.1.v20130911-1000
Just have installed JBDS 4.1.1.Beta1 and JBDS 4.1.1.Beta1a and both have this problem.
> Renaming HTML file doesn't change editor title
> ----------------------------------------------
>
> Key: JBIDE-15789
> URL: https://issues.jboss.org/browse/JBIDE-15789
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: jsp/jsf/xml/html source editing
> Affects Versions: 4.1.1.Beta1
> Environment: JBT 4.1.1 Beta1-v20131020-0207-B454 Linux KDE
> Reporter: Vlado Pakan
> Assignee: Victor Rubezhny
> Fix For: 4.2.x
>
>
> 1. Create project with HTML file
> 2. Open HTML file in VPE
> 3. Rename HTML file in Package Explorer
> ASSERT: File is renamed in Package Explorer
> ERROR: Editor title of opened HTML file is not changed
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months