Firefox中的异常行为-使用ENTER输入文本可打开页面进行编辑 [英] Strange behavior in Firefox - input text with ENTER opens page for editing

查看:65
本文介绍了Firefox中的异常行为-使用ENTER输入文本可打开页面进行编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们通常不使用Firefox,并且该行为在IE和Chrome中可以正常运行,但这使我发疯.

We don't usually use Firefox, and the behavior works as expected in IE and Chrome, but this is driving me nuts.

SharePoint 2010 SP1

SharePoint 2010 SP1 

在团队网站的/SitePages中的新页面上(因此它是Wiki样式的页面),添加HTML Form Webpart(或CEWP指向.js文件,具有相同的行为)

In a team site, on a new page in /SitePages (so it's a wiki style page), add an HTML Form webpart (or a CEWP pointed to a .js file, same behavior)

下面的代码具有一个输入文本框,一个按钮和一个JQuery例程,该例程捕获回车键并单击该按钮.请注意,我还尝试了其他方法-进行onkeyup事件以捕获回车键. 

The code (below) has an input text box, a button, and a JQuery routine that captures the enter key and clicks the button. Note I've also tried different methods - doing onkeyup events to capture the enter key as well. 

在IE/Chrome中,它可以工作.单击按钮起作用.使用Enter键有效.

In IE/Chrome, it works. Click button works. Using enter key works.

在Firefox(29.0.1,Windows 7 Enterprise SP1)中,单击按钮可以正常工作.但是使用ENTER键可以使页面进入编辑模式.

In Firefox (29.0.1, Windows 7 Enterprise SP1), clicking button works as expected. But using ENTER key works then the page is put into edit mode.

我不知道是什么导致了编辑模式.我已经尝试过Fiddler和调试脚本,但对我所看到的没有任何意义.有任何想法吗?这是我正在研究的星期五难题"之一,尽管大多数情况下不会发生,但主要用户之一 我正在开发的一个新站点中有一个喜欢Firefox,所以她会遇到这个问题.

I can't figure out what's causing the edit mode. I've tried Fiddler and debugging scripts but can't make any sense of what I see. Any ideas? This is one of those 'Friday puzzles' I work on and while it won't happen most of the time, one of the main users of a new site I'm working on likes Firefox, so she'll run into this.

<input type="text" name="fmgSearch" id="fmgSearch"   /> 
<input type="button" id="fmgDesignerBtn" class="fmgBtn" value="Search Designers" onclick="javascript:findContest(fmgSearch.value,'Designer')"/>
<div id="fmgRequestsSearchResults"></div>

<script type="text/javascript" src="/Javascript/JQuery/JQueryMin-1.11.1.js"></script>
<script src="/Javascript/JQuery/jquery.SPServices-2014.01.min.js"></script>
<script type="text/javascript">

	$(document).ready(function() {
		$("#fmgSearch").keyup(function(event){		 
			if(event.keyCode == 13){
				$("#fmgDesignerBtn").click();
			}
		});
		$('#fmgSearch').focus();
	 
	}); // end of document ready
	
	// dummy function for test
	function findContest(search, type) {
		$('#fmgRequestsSearchResults').empty();
		$('#fmgRequestsSearchResults').append('<span>Ran test</span>');
		
	}
</script>

Robin

推荐答案

罗宾,

我做了一些测试,发现此问题与SharePoint 2010中使用Firefox的文本框中的Enter键有关.

I did some tests, and found this issue was related to Enter key in a Textbox using Firefox in SharePoint 2010.

我们将帮助您将问题提交到适当的渠道.再次感谢您的报告,这肯定会使SharePoint成为更好的产品.可能会有一些时间延迟.感谢您的时间和耐心.

We will help to submit the issue to proper pipeline for you. Again, thank you for your report which will definitely make SharePoint a better products. There might be some time delay. Appreciate your time and patience.

谢谢

温迪

论坛支持

请记住,如果有帮助,请将其标记为答案;如果没有帮助,则将其取消标记.如果您对TechNet订户支持有任何反馈,请联系 tnmff@microsoft.com .

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


这篇关于Firefox中的异常行为-使用ENTER输入文本可打开页面进行编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆